Skip to main content
Glama

Map Repository

repo_map
Read-only

Maps a repository into a compact JSON code map and filters results by domain, file kind, or controller route to locate relevant feature, type, or endpoint files.

Instructions

Map a repository into a compact JSON code map, optionally narrowed by domain, file kind, or controller route. Pass domain to find files for a feature, kind to find files of a type (route, controller, service, apiClient, component, test), or route to match Nest controller routes by substring/regex.

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

Input Schema

NameRequiredDescriptionDefault
kindNoOptional file kind filter such as route, controller, service, apiClient, component, test.
pathNoRepository path. Defaults to current working directory.
limitNoMaximum files to include. Defaults to 100.
routeNoOptional route filter. Substring or regex matched against each controller's combined route (controllerBasePath + httpMethods paths) and file path.
domainNoOptional domain filter such as booking, payment, email, events.
includeFilesNoInclude matching files in the response. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes this is a safe read, so the description only needs to add context. It contributes the output being a compact JSON code map and clarifies route matching semantics, but says nothing about cost on a large repo, truncation behavior, or how includeFiles changes the payload.

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 dense sentences with the core action front-loaded and the filter options following immediately. No filler, though the second sentence partially duplicates parameter text.

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?

With six optional parameters, a 100% covered schema, and no output schema, the description supplies the one thing structured data cannot: what the tool returns ('compact JSON code map'). Filters, defaults, and the read-only nature are all covered.

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 coverage is 100%, so the schema already documents all six parameters including the kind examples and the route substring/regex semantics. The description largely repeats that content ('route to match Nest controller routes by substring/regex') rather than adding meaning, so this lands at the baseline.

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 names a specific verb and resource ('Map a repository') plus the output shape ('compact JSON code map'), which is more than a restatement of the title. It does not explicitly distinguish itself from close siblings like repo_index or repo_inspect, so an agent must infer that this produces structure rather than raw search results.

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?

The second sentence gives conditional guidance for each filter ('Pass domain to find files for a feature, kind to find files of a type, route to match Nest controller routes'), which is useful in-tool routing. However, there is no statement of when to choose repo_map over repo_search, repo_index, or repo_inspect, and no exclusions or prerequisites.

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