Skip to main content
Glama

code_repo_map

Read-onlyIdempotent

Map indexed code to reveal the most referenced files, their main definitions, and usage counts so you can navigate an unfamiliar repository or focus on a folder with path.

Instructions

A map of indexed code: the files the rest of the code refers to most, each with its main definitions and how many other files use each. Start here in an unfamiliar repository, or pass path to map one folder.

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": {
      "containerId": "<containerId>"
    },
    "name": "code_repo_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoOnly files under this folder, e.g. "src/billing"
maxFilesNoAt most this many files (1-200). Default 30
containerIdYesContainer or source ID or name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint), and the description goes beyond them by disclosing the shape of the result: ranked files, their main definitions, and a per-file usage count. It hints that only "indexed code" is visible but never says what happens for an unindexed container or how ranking is computed.

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?

Two sentences, no filler: the payoff (a ranked map with definitions) comes first, followed by the routing guidance. Every clause earns its place.

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?

With no output schema, the description carries the burden of explaining the return value, and it does so adequately by describing ranked files and their definition/usage data. Only the index-freshness and unindexed-container behavior are left unstated, which is minor for a read-only orientation tool.

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 path, maxFiles, and containerId are already fully documented with examples, defaults, and bounds. The description only restates that `path` scopes the map to one folder, adding little beyond the schema, which is the expected 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 resource and its content precisely: files ranked by how many other files reference them, each with its main definitions and usage counts. That clearly separates it from lookup tools like code_find_symbol or code_references, though it never names those siblings explicitly.

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?

"Start here in an unfamiliar repository" gives an explicit when-to-use condition, and passing `path` is presented as the narrower alternative for a single folder. There are no stated exclusions (e.g., when to prefer code_impact or code_references instead), but the orientation use case is unambiguous.

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