Skip to main content
Glama

spec_nav_map

Search codebases with case-insensitive regex, tag each hit by enclosing function, and page results completely. Narrow by service or file; summary view groups hits by function.

Instructions

Regex search across every project under the root (code, then config/docs/SQL), each code hit tagged with the function it sits in. When the service or file is known, narrow with services/file. Paged, never silently cut: the header says COMPLETE or gives a cursor. Default view: every matching line; view: "summary" groups them by function and says it does not show every line. Long lines end with ….

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoOnly files whose path contains this, matches it as a * glob, or as a regex (/…/, or a value with | ( ^ $ \, e.g. "services/(order|payment)").
viewNo"detail" (default): every matching line. "summary": hits grouped by function, with counts and line numbers; a short result is shown in full.
cursorNoThe nextCursor from the previous page. Repeat the other arguments unchanged.
contextNoLines shown before and after each hit, like grep -C (default 0; above 10 is read as 10).
patternYesRegex, case-insensitive. E.g. "handl(e|ing)_?fee|handling_charge"
pageSizeNoMax hits per page (summary: max functions); pages are also cut at ~30k characters.
servicesNoServices/directories relative to the root (e.g. "services/api"); "." is the root project's own files. Default: the whole repo.
includeTextNoAlso search config, docs and other text files (default true).
includeCommentsNoInclude comment and import lines (skipped by default as noise)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.8.0
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Lines shown before and after each hit, like grep -C (default 0; above 10 is read as 10).",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / file
      Added value: +{
      +  "description": "Only files whose path contains this, matches it as a * glob, or as a regex (/…/, or a value with | ( ^ $ \\, e.g. \"services/(order|payment)\").",
      +  "type": "string"
      +}
    • addedInput schema / properties / includeText
      Added value: +{
      +  "description": "Also search config, docs and other text files (default true).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / pageSize / description
      Previous value: -"Max hits per page (pages are also cut at ~30k characters)."New value: +"Max hits per page (summary: max functions); pages are also cut at ~30k characters."
    • changedInput schema / properties / services / description
      Previous value: -"Limit to these services/directories, relative to SPEC_NAV_ROOT (e.g. \"services/api\", \"packages\"). \".\" is the root project's own files. Omit to cover the whole repo — the default."New value: +"Services/directories relative to the root (e.g. \"services/api\"); \".\" is the root project's own files. Default: the whole repo."
    • addedInput schema / properties / view
      Added value: +{
      +  "description": "\"detail\" (default): every matching line. \"summary\": hits grouped by function, with counts and line numbers; a short result is shown in full.",
      +  "enum": [
      +    "detail",
      +    "summary"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.4.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses pagination semantics ('Paged, never silently cut: the header says COMPLETE or gives a cursor'), default vs summary view behavior, and truncation ('Long lines end with …'). It omits permissions, error behavior, and rate limits, but covers the operationally important traits.

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 purpose before behavioral notes, and every sentence carries information (search order, narrowing, pagination, view modes, truncation). It is somewhat run-on with several clauses packed into one paragraph but wastes little.

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?

For a 9-param search tool with no output schema and no annotations, the description covers pagination, result header semantics, view modes, and truncation. Missing permissions and error-handling context, but the operational essentials an agent needs to invoke it are present.

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%, so the schema already documents all 9 parameters in detail. The description adds only light meaning (summary grouping, narrowing with services/file, view caveat), largely echoing the schema. Baseline 3 is appropriate.

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: 'Regex search across every project under the root,' with the search order (code, then config/docs/SQL) and the tagging behavior (each code hit tagged with its enclosing function). This clearly distinguishes it from function-level siblings like spec_nav_read_function and spec_nav_callers.

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?

Gives concrete usage context: 'When the service or file is known, narrow with services/file.' This tells the agent how to scope a search, but names no alternative tool or when-not condition (e.g., when to prefer a function-level tool instead). Clear context, no exclusions.

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