get_cspf_path
Constrained-shortest-path (CSPF) query between two nodes.
Description: Answers "will an LSP with these constraints fit, and which path would it take" -- an on-demand computation, exactly like get_shortest_path, just over a graph pre-filtered by the given TE constraints instead of the plain one. No tunnel is created or persisted; this never mutates the graph. Use this before calling add_lsp when you want to check feasibility first.
Input fields: graph_time (str): The graph time identifier node_a (str): Source node name node_b (str): Destination node name bandwidth (str, optional): Required bandwidth, e.g. "2G", "500M", or a raw bps number metric_type (str, optional): "igp" (default) or "te" admin_exclude_any (list[str], optional): Admin groups to exclude. On an IS-IS graph a group is the number of a bit of the link's admin group mask (bit 0 is the least significant; "2" avoids mask 0x00000004); on a YAML diagram it is an affinity name admin_include_any (list[str], optional): Admin groups, at least one required admin_include_all (list[str], optional): Admin groups, all required srlg_exclude (list[int], optional): SRLG ids to exclude setup_priority (int, optional): RSVP-TE setup priority (0-7, default 7) -- selects which advertised Unreserved Bandwidth pool the bandwidth check runs against level (int, optional): IS-IS level, 1 or 2. Restricts the path to links that advertised their TE data at that level; omit for no level restriction. No effect on a non-IS-IS graph. Fails with isis_level_calculation_unavailable on a graph stored before per-level IS-IS data existed (re-upload the LSDB), and with isis_level_unavailable_for_yaml_diagram on a YAML diagram
Output fields: CspfPathResponse: dict with keys: - path: list of node names (empty if no path satisfies the constraints) - cost: total path metric (null if unplaced) - reason: why placement failed, e.g. which constraint removed the only path (empty string on success)
Equivalent to GET /graph/{graph_time}/cspf-path/{node_a}/{node_b}.
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>",
"node_a": "<node_a>",
"node_b": "<node_b>"
},
"name": "get_cspf_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | ||
| node_a | Yes | ||
| node_b | Yes | ||
| bandwidth | No | ||
| graph_time | Yes | ||
| metric_type | No | igp | |
| srlg_exclude | No | ||
| setup_priority | No | ||
| admin_exclude_any | No | ||
| admin_include_all | No | ||
| admin_include_any | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | Yes | ||
| path | Yes | ||
| reason | Yes |