Networking
Simulate AS_PATH loop detection, policy filtering, attribute changes, and deterministic best-path selection.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/bgp-as-path-loop-policy-sandbox' \
-H 'Content-Type: application/json' \
-d '{"localAs":64500,"routeEntries":"[{\"prefix\":\"203.0.113.0/24\",\"asPath\":\"64501 64496\",\"localPref\":100,\"med\":50,\"origin\":\"igp\"},{\"prefix\":\"203.0.113.0/24\",\"asPath\":\"64502 64496\",\"localPref\":200,\"med\":100,\"origin\":\"igp\"},{\"prefix\":\"198.51.100.0/24\",\"asPath\":\"64500 64496\",\"localPref\":150,\"med\":10,\"origin\":\"igp\"},{\"prefix\":\"192.0.2.0/24\",\"asPath\":\"64503\",\"localPref\":120,\"med\":20,\"origin\":\"egp\"}]","policyRules":"[{\"name\":\"raise preferred prefix\",\"action\":\"permit\",\"prefix\":\"203.0.113.0/24\",\"setLocalPref\":180},{\"name\":\"deny documentation loop\",\"action\":\"deny\",\"prefix\":\"198.51.100.0/24\"}]","defaultAction":"deny","selectBestPath":true}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/bgp-as-path-loop-policy-sandbox| Name | Type | Required | Description |
|---|---|---|---|
| localAs | number | Yes | — |
| routeEntries | textarea | Yes | — |
| policyRules | textarea | Yes | — |
| defaultAction | select | Yes | — |
| selectBestPath | checkbox | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-bgp-as-path-loop-policy-sandbox": {
"name": "bgp-as-path-loop-policy-sandbox",
"description": "Simulate AS_PATH loop detection, policy filtering, attribute changes, and deterministic best-path selection.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=bgp-as-path-loop-policy-sandbox",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "bgp-as-path-loop-policy-sandbox",
"arguments": {
"localAs": 64500,
"routeEntries": "[{\"prefix\":\"203.0.113.0/24\",\"asPath\":\"64501 64496\",\"localPref\":100,\"med\":50,\"origin\":\"igp\"},{\"prefix\":\"203.0.113.0/24\",\"asPath\":\"64502 64496\",\"localPref\":200,\"med\":100,\"origin\":\"igp\"},{\"prefix\":\"198.51.100.0/24\",\"asPath\":\"64500 64496\",\"localPref\":150,\"med\":10,\"origin\":\"igp\"},{\"prefix\":\"192.0.2.0/24\",\"asPath\":\"64503\",\"localPref\":120,\"med\":20,\"origin\":\"egp\"}]",
"policyRules": "[{\"name\":\"raise preferred prefix\",\"action\":\"permit\",\"prefix\":\"203.0.113.0/24\",\"setLocalPref\":180},{\"name\":\"deny documentation loop\",\"action\":\"deny\",\"prefix\":\"198.51.100.0/24\"}]",
"defaultAction": "deny",
"selectBestPath": true
}
}
}Questions or issues? Contact [email protected]