Skip to main content
Glama

Topolograph

get_cspf_path

Read-onlyIdempotent

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

NameRequiredDescriptionDefault
levelNo
node_aYes
node_bYes
bandwidthNo
graph_timeYes
metric_typeNoigp
srlg_excludeNo
setup_priorityNo
admin_exclude_anyNo
admin_include_allNo
admin_include_anyNo

Output Schema

NameRequiredDescriptionDefault
costYes
pathYes
reasonYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, but the description goes further: no tunnel is created or persisted, and specific failure modes are named (isis_level_calculation_unavailable on stale graphs, isis_level_unavailable_for_yaml_diagram). It also discloses that an empty path with a reason is a normal success-path outcome rather than an error. It does not discuss cost/latency or graph-size limits, so not quite a 5.

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?

Purpose is front-loaded, then input and output fields are cleanly sectioned per parameter. The 'Output fields' block largely restates the existing output schema and the preamble runs a little long, but with 11 parameters the length is largely earned.

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

Completeness5/5

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

For an 11-parameter read-only computation, everything needed is present: all parameters documented with types and defaults, the constraint-removal failure explanation, the empty-path semantics, and the REST endpoint equivalent. Nothing an agent needs in order to call it correctly is missing.

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 description coverage is 0%, so the description carries the entire burden and does so thoroughly: bandwidth format examples ('2G', '500M', raw bps), the bit-mask versus affinity-name interpretation of admin groups on IS-IS vs YAML graphs, setup_priority's role in selecting the Unreserved Bandwidth pool, and level's IS-IS-only semantics with its exact error conditions.

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 (constrained-shortest-path query between two nodes) and frames it as the answer to a concrete question: 'will an LSP with these constraints fit, and which path would it take'. It explicitly distinguishes itself from both get_shortest_path (same computation, pre-filtered graph) and add_lsp (feasibility check before creation).

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

Usage Guidelines5/5

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

Gives an explicit routing rule: 'Use this before calling add_lsp when you want to check feasibility first', and contrasts it with get_shortest_path by noting the graph is pre-filtered by TE constraints. The non-mutating, non-persisting nature of the call is also stated so the agent knows it can be run speculatively.

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.