get_edges
Get edges from a graph with optional filtering.
Description: Returns a paginated list of edges. Supports graph-level pre-filters (protocol, watcher, area) and per-edge attribute filters. Useful for queries like "all IS-IS L1 edges" or "edges with max_rsrv_link_bw < 10Gbps". Edges are the source of neighbor/adjacency data: to find a router's neighbor count, fetch edges and count those with that router as src_node. Results are paginated; read all pages (see pagination.total_pages) before counting.
Attribute filters use exact match or range operators:
weight=10, temetric__gt=100, unreserved_bw_0__lt=1000000000
TE attributes (when present): temetric, admin_group, max_link_bw,
max_rsrv_link_bw, unreserved_bw_0..7
IS-IS: isis_level=1 or isis_level=2
User-defined attributes (e.g. isp_provider=verizon) are also supported.Input fields: graph_time (str): The graph time identifier, or the name of your OSPF/IS-IS watcher (Enterprise) to read its newest snapshot with events up to now; the answer then names that snapshot in graph_time src_node (str, optional): Filter edges by source node name dst_node (str, optional): Filter edges by destination node name protocol (str, optional): Graph-level filter (ospf, ospfv3, isis, yaml) watcher (bool, optional): Graph-level filter: watcher-uploaded vs manually parsed area (str, optional): Graph-level filter by area edge_query_params (dict, optional): Edge attribute filters (flat key=value pairs) include (list[str], optional): Extra MPLS-TE fields, hidden by default: "lsp_left_bw" (how much TE bandwidth is left on each edge, after accounting for placed LSP tunnels -- lsp_left_bw_0..7 plus a human-readable lsp_reserved_bw/lsp_left_bw/lsp_bandwidth_usage pair at the default priority-7 pool), "lsps" (which LSP tunnels traverse this edge), "is_te_link" (true when the link advertises at least one optional TE value: TE metric, admin group, max/reservable/unreserved bandwidth or SRLG; a zero counts, interface and neighbor addresses do not), "edge_key" (stable identity, needed for get_lsps(via_edge_key=) on parallel/ECMP edges) page (int): Page number, 1-indexed (default: 1) per_page (int): Items per page (default: 50) is_te_link (bool, optional): true keeps only TE links, false only links that are not; any other type is rejected with HTTP 400 at (str, optional): ISO 8601 moment; state with watcher events applied up to it
Output fields: dict with keys: items: list of edges with src, dst, weight, and optional TE/IS-IS/user-defined attrs pagination: page, per_page, total, total_pages
Equivalent to GET /graph/{graph_time}/edges.
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": {
"graph_time": "<graph_time>"
},
"name": "get_edges"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | ||
| area | No | ||
| page | No | ||
| include | No | ||
| watcher | No | ||
| dst_node | No | ||
| per_page | No | ||
| protocol | No | ||
| src_node | No | ||
| graph_time | Yes | ||
| is_te_link | No | ||
| edge_query_params | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||