Skip to main content
Glama

Map Repository

repo_map
Read-only

Map a repository into a compact JSON code map, filtered by domain, file kind, or route. Locate feature files, controllers, services, components, and tests without changing the repo.

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. Replaces the old find_domain, find_file_kind, find_backend_route, and find_frontend_api_client tools. Uses a per-user external cache and leaves the target repository unchanged.

Input Schema

TableJSON 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

A4.2/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description explicitly states 'Uses a per-user external cache and leaves the target repository unchanged,' which discloses side effects and safety. It also reveals that the output is a compact JSON code map and that this tool replaces four older tools, adding useful behavioral context beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is composed of four concise sentences, each carrying distinct information: core function, filter usage, legacy replacement, and caching/non-destructive behavior. It is front-loaded with the primary purpose and contains no redundant or filler content.

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?

The description covers purpose, filter semantics, caching, and non-destructive behavior, and the schema fully documents all six optional parameters. However, it does not describe the structure or contents of the resulting 'code map' beyond calling it compact JSON, which is a notable gap given there is no output schema. An agent might not know what fields or sections to expect in the response.

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 description coverage is 100%, so the baseline is 3. The description adds semantic meaning for the main filters: domain for feature files, kind for file types, and route for Nest controller routes. This clarifies intent beyond the schema's terse examples, especially by linking 'kind' to a specific list of file types.

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?

The description states a specific action and resource: 'Map a repository into a compact JSON code map' with optional narrowing by domain, file kind, or route. It also names the legacy tools it replaces, clarifying that this is the consolidated successor for those search/filter operations. This makes the tool's purpose unambiguous and distinct from the sibling repo_* tools.

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 description gives clear guidance on when to use each filter ('Pass domain to find files for a feature, kind to find files of a type...'), which is useful for parameter selection. However, it does not explicitly compare against current siblings like repo_search, repo_inspect, or repo_index; it only mentions replaced legacy tools. Thus, when-to-use versus current alternatives is implied rather than explicit.

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