Skip to main content
Glama

lab_state

Read-onlyIdempotent

Read a saved network lab state and summarize what is wrong: down interfaces, OSPF interfaces without adjacency, mismatched neighbors, and BGP sessions not Established. Reports node, link, OSPF and BGP counts without contacting routers.

Instructions

Read a network-xray lab state (read-only) and summarize it. Starts with wrong: what is wrong, each with a text line (an interface down, an OSPF interface that faces a neighbor and has no adjacency with the values both ends must share and do not, a Full adjacency whose ends still differ, a BGP session not Established); empty when nothing is. Then nodes and interfaces, links, OSPF adjacencies, BGP sessions and counts. An adjacency that never came up is not in a neighbor table, so counts also has ospf_ifaces_expected (OSPF interfaces that face a neighbor, not passive), ospf_ifaces_full and ospf_ifaces_without_adjacency. No router is contacted.

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": "lab_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoA state_<node>.json, a directory of them, an xray-states.js, or a directory of saved FRR show ... json files (optional here: the server was started with /app/demo/bgp-lp/frameB.json)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / path / description
      Previous value: -"A state_<node>.json, a directory of them, an xray-states.js, or a directory of saved FRR show ... json files (optional here: the server was started with /app/demo/compose-bgp-lp/web/xray-states.js)"New value: +"A state_<node>.json, a directory of them, an xray-states.js, or a directory of saved FRR show ... json files (optional here: the server was started with /app/demo/bgp-lp/frameB.json)"
  2. Changed2 schema fields changed
    • changedInput schema / properties / path / description
      Previous value: -"A state_<node>.json, a directory of them, an xray-states.js, or a directory of saved FRR show ... json files"New value: +"A state_<node>.json, a directory of them, an xray-states.js, or a directory of saved FRR show ... json files (optional here: the server was started with /app/demo/compose-bgp-lp/web/xray-states.js)"
    • changedInput schema / required
      Previous value: -[
      -  "path"
      -]New value: +[]
  3. First observedv1.4.3

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already carry the safety profile (readOnly, idempotent, non-destructive, closed-world), yet the description still adds real behavioral context: the ordered 'wrong' summary, the full return sections (nodes/interfaces, links, OSPF adjacencies, BGP sessions, counts), and the explicit 'No router is contacted.' It does not cover pagination or output size, keeping it off 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.

Conciseness3/5

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

The purpose is front-loaded, but the second sentence is a long parenthetical that packs four unrelated failure modes and their shared-value conditions into one clause. It is informative yet dense and hard to scan, so it earns its place but is not efficiently structured.

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?

There is no output schema, so the description must explain the return shape, and it does so across several paragraphs, including the subtle ospf_ifaces_expected/ospf_ifaces_without_adjacency counters. Minor gaps remain in what fields each node/interface/link entry carries, but nothing critical to calling it correctly is missing.

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?

The single parameter is fully documented in the schema (100% coverage, including accepted file/directory forms and the server default). The description adds nothing about `path` beyond what the schema already says, so the baseline of 3 applies.

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

Purpose4/5

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

The description opens with a specific verb and resource: 'Read a network-xray lab state (read-only) and summarize it.' That is unambiguous and distinguishable from siblings like state_diff or ospf_interfaces, but it never explicitly contrasts itself with those tools, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the 'wrong'-first ordering suggests it is the orienting/overview call before drilling into ospf_interfaces or bgp_neighbors, and the path note hints at when the default source is used. There is no explicit when-to-use, when-not-to-use, or named alternative, so it stays at the minimum-viable level.

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