Skip to main content
Glama

Save topology

save_topology
Destructive

Save the current network topology (devices, links, IOS commands, host IP settings) to a JSON file that can be reloaded later. Existing files are overwritten only when overwrite is set.

Instructions

Save the current topology (devices, links, IOS commands, host IP configurations) to a JSON file that load_topology can read back. Use an absolute path: relative paths resolve against $MCP_TRACER_DIR if set, else the server's working directory (now /app), which MCP clients often set arbitrarily. "~" is the user's home directory. Missing folders are created. Refuses to replace an existing file unless overwrite: true. The result shows the absolute path written.

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": {
      "path": "<path>"
    },
    "name": "save_topology"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile to write, e.g. C:\labs\vlans.json or /home/me/labs/vlans.json. Only .json file names are accepted; .json is added when the file name has no extension. Absolute path recommended.
overwriteNotrue = replace the file if it already exists.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and non-idempotent, and the description adds the concrete behavior behind that: it refuses to replace an existing file unless overwrite is true, it creates missing folders, it expands '~', it resolves relative paths against $MCP_TRACER_DIR or the working directory, and it reports the absolute path written. These are exactly the side effects and failure conditions an agent needs before committing a write.

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?

The core action and the load_topology pairing lead the text, followed by path-resolution rules and the overwrite guard. Every sentence is informative; the parenthetical 'now /app' and the remark about clients setting arbitrary directories are slightly chatty but still help explain the hazard.

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?

There is no output schema, and the description covers the return ('the result shows the absolute path written') as well as the write precondition and path semantics. For a two-parameter destructive write tool, nothing material is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes beyond the schema by explaining how the path string is interpreted (absolute vs relative resolution order, '~' expansion, folder creation for missing directories) and restates the overwrite guard with its consequence. That adds real meaning to the one required parameter.

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 (save) and resource (the current topology), enumerates the content being persisted (devices, links, IOS commands, host IP configurations), and explicitly names load_topology as the read-back counterpart. That is enough to distinguish it from the other topology siblings without opening any schema.

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?

It gives clear operational guidance on how to call it (use an absolute path, why relative resolution is unreliable) and states the overwrite precondition. It does not explicitly say when to prefer this over alternatives such as export_script or generate_script, so routing guidance is implied rather than spelled out.

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