Skip to main content
Glama

Batfish Get Topology

batfish_get_topology

Retrieve a snapshot's network topology as nodes and edges, including Layer 3 links or routing adjacencies, to analyze connectivity and routing relationships.

Instructions

Return the topology graph of a snapshot as nodes/edges.

  • kind="layer3" (default): L3 links from layer3Edges (node — interface <-> interface — node, so edges carry a title like "r1 (Gi0/0) <---> r2 (Gi0/0)").

  • kind="routing": routing adjacencies from bgpEdges.

Returns {kind, snapshot, node_count, edge_count, nodes, edges}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "batfish_get_topology"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNolayer3
networkNo
snapshotNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral burden. It does useful work by spelling out the node/interface/edge shape and the `title` string format, which the agent cannot get elsewhere, but it omits what happens when the snapshot is not analyzed, when the topology is empty, or whether the call is purely read-only against existing data.

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-loaded with the core action, then a compact bulleted breakdown of modes, then the return keys. Every line is relevant, though the explicit return-key list partially duplicates the output schema that already exists.

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

Completeness3/5

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

Adequate for a read tool with an output schema that handles return values, and the mode semantics are well covered. It still leaves the snapshot/network selectors and the prerequisite state of the snapshot undescribed, which matters for a tool that will fail or return nothing if the wrong snapshot context is supplied.

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

Parameters3/5

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

Schema description coverage is 0% for three parameters, so the description must compensate and only partly does: `kind` is fully specified with its default and mode meanings. `network` and `snapshot` are never mentioned, leaving two of three parameters with no semantic documentation anywhere.

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 ("Return the topology graph of a snapshot as nodes/edges") and immediately distinguishes the two modes it supports. The sibling tools are all question/snapshot administration tools, so no sibling disambiguation is needed here; the mode split does the differentiating work.

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?

Explicitly tells the agent which `kind` to pick and what each yields: layer3 is the default for L3 links, routing is for BGP adjacencies. It does not say when to prefer this tool over a question-based alternative, nor what prerequisites exist (e.g. whether the snapshot must already be parsed/initialized).

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