Skip to main content
Glama

Topolograph

search_bgp_routes

Read-onlyIdempotent

Search BGP routes, one row per distinct RFC 4271 9.1 path.

Description: Without router_id, searches the whole BGP graph's route table (GET /routes). With router_id, scopes the search to that speaker's own resolved RIB view (GET /node/{router_id}/routes) -- the routes that speaker actually holds, folded on the same path definition; that scoped form does not accept bmp_source or table_filters (rib_view is already a single table). bmp_source and bmp_ribs come back as arrays.

Input fields: bgp_graph_time (str): The BGP graph epoch to query router_id (str, optional): Scope the search to one speaker's resolved RIB view prefix (str, optional): CIDR is an exact match; an address returns every covering route, longest prefix first vrf (str, optional), rd (str, optional), rt (str, optional): VPN identifiers afi (int, optional), safi (int, optional): Address family filters bmp_rib (str, optional): Filter by RIB tag (e.g. adj-rib-in-pre, loc-rib) evidence (str, optional): pre_policy, post_policy, loc_rib, or fib as_path_contains (str, optional): Substring match over the AS path origin (str, optional), local_pref (int, optional), med (int, optional) community (str, optional), large_community (str, optional), extended_community (str, optional) label (int, optional), originator_id (str, optional), peer_ip (str, optional), nexthop (str, optional) bmp_source (str, optional): Ignored when router_id is set table_filters (str, optional): URL-encoded JSON object keyed by route column, e.g. '{"communities":{"conditions":[{"join":"and","operator":"contains","value":"65000:100"}]}}'. Ignored when router_id is set. ribs (str, optional): Comma-separated exact RIB-tag set to match against the folded policy set, e.g. "loc-rib,post" sort (str, optional): Indexed route column to order by order (str): asc or desc (default: asc) page (int): Page number, 1-indexed (default: 1) per_page (int): Items per page (default: 50)

Equivalent to GET /bgp-graph/{bgp_graph_time}/routes or GET /bgp-graph/{bgp_graph_time}/node/{router_id}/routes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "bgp_graph_time": "<bgp_graph_time>"
    },
    "name": "search_bgp_routes"
  }
}

Input Schema

NameRequiredDescriptionDefault
rdNo
rtNo
afiNo
medNo
vrfNo
pageNo
ribsNo
safiNo
sortNo
labelNo
orderNoasc
originNo
prefixNo
bmp_ribNo
nexthopNo
peer_ipNo
evidenceNo
per_pageNo
communityNo
router_idNo
bmp_sourceNo
local_prefNo
originator_idNo
table_filtersNo
bgp_graph_timeYes
large_communityNo
as_path_containsNo
extended_communityNo

Output Schema

NameRequiredDescriptionDefault
itemsYes
paginationYes
sortable_columnsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only, idempotent, non-destructive, open-world semantics, so the safety profile is covered. The description usefully adds behavioral facts the annotations cannot: results are folded on a path definition, bmp_source and bmp_ribs are returned as arrays, and the router_id form ignores two filters rather than erroring. It still says nothing about result size, pagination limits beyond defaults, or cost of the whole-graph search.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the one-sentence summary and the router_id fork before the parameter list, and the labeled sections make 28 parameters scannable. The 'Description:' and 'Input fields:' headers plus the trailing 'Equivalent to GET ...' restatement of endpoints already implied earlier cost a little space, but nothing is genuinely redundant for a tool of this size.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present the description need not describe return values, and it covers mode selection, nearly every parameter, and the endpoint mapping. Remaining gaps are small but real: 'sort' only says 'indexed route column' without naming the allowed columns, and per_page bounds and total-count behavior are unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% across 28 parameters, so the description carries the full burden and largely meets it: prefix CIDR is an exact match whereas a bare address returns all covering routes longest-prefix-first, evidence enumerates pre_policy/post_policy/loc_rib/fib, table_filters is spelled out with a URL-encoded JSON example keyed by route column, and ribs is defined as a comma-separated exact tag set matched against the folded policy set.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search BGP routes') plus the exact result granularity ('one row per distinct RFC 4271 9.1 path'), and names the two underlying endpoints so the agent knows precisely which data set is being read. The router_id scoping paragraph further distinguishes the whole-graph mode from the single-speaker RIB mode.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the decisive fork: without router_id you search the whole BGP graph's route table, with router_id you get one speaker's resolved RIB view, and that scoped form silently drops bmp_source and table_filters. What is missing is any routing versus neighbouring tools such as compare_bgp_routes or get_bgp_route_state; the guidance is thorough within the tool but never excludes alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.