Skip to main content
Glama

Routes and handlers

snapshot_routes
Read-onlyIdempotent

Summarize every HTTP route in a repository from decorators, framework attributes, and route tables, with the declaring file and part. Read-only.

Instructions

Every route a summary recorded - HTTP methods from decorators, framework attributes and route tables - with the file and part that declare it. Read-only.

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

Input Schema

NameRequiredDescriptionDefault
rootNoRepository root. Defaults to the directory this server was started in.
outDirNoSnapshot directory, relative to the root, and it must resolve inside the served repository. Defaults to the project configuration's outDir.
patternNoOnly routes whose text matches this regular expression.

Output Schema

NameRequiredDescriptionDefault
totalNo
routesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds that results come from multiple detection sources (decorators, framework attributes, route tables) and include declaring file and part, which is useful extraction context. It does not describe coverage limits or what happens when no routes are found.

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?

Two compact sentences, front-loaded with what is enumerated before the safety tag. The em-dash clause is dense but each element (sources, file, part) is informative.

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?

Output schema exists so return values need not be explained, annotations cover the safety profile, and schema coverage is full. The description still communicates extraction sources and result provenance, leaving nothing an agent needs 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?

Schema description coverage is 100%, with each of the three optional parameters documented (root default, outDir constraint, pattern regex filter). The description adds no parameter-level detail beyond that, so baseline 3 is appropriate.

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?

States a specific resource (routes) and what is enumerated: HTTP methods from decorators, framework attributes, and route tables, plus the declaring file and part. This distinguishes it from symbol/locate/query siblings by naming the route-extraction concept, though it doesn't name a specific sibling alternative.

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

Usage Guidelines2/5

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

No explicit when-to-use guidance and no alternatives named. The 'Read-only' note implies a safe inspection tool, but an agent must infer that this is the tool for mapping routes versus snapshot_locate or snapshot_symbol.

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