Skip to main content
Glama

Map the codebase

map
Read-only

Analyze repository architecture to find modules, central files, used symbols, and entry points; zoom into a directory to outline files and symbols with line numbers.

Instructions

Start here. A map of the repository: modules (communities of files that depend on each other), the most central files (PageRank), the most used symbols, and entry points. Pass focus (a directory) to zoom in and get an outline of its files and symbols with line numbers.

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

Input Schema

NameRequiredDescriptionDefault
rootNoRepository root. Defaults to the client's workspace root or the server's working directory.
focusNoDirectory to zoom into, e.g. src/server.
limitNoItems per section (default 12).
formatNotext (default, compact, file:line cited) or json.
tokensNoToken budget (estimated at 4 characters per token). Fills the map with the highest-ranked modules, files and symbols up to the budget and says what was omitted. Default: no budget.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds real behavioral context beyond that: the map is an overview-first artifact, focus switches to a zoomed outline with line numbers, and the tokens parameter truncates by rank while reporting omissions. It stops short of describing ranking staleness or refresh behavior, but nothing contradicts the annotations.

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 tightly packed sentences with zero filler; the imperative 'Start here' is front-loaded and the drill-down instruction follows immediately. Every clause carries information about content or usage.

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?

Five optional parameters and no output schema, so the description must carry the return-shape burden, which it does by enumerating the sections of the map and noting file:line citations. It does not explain how the text vs json formats differ beyond 'compact', but an agent has enough to call it correctly.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning: it explains that focus produces an outline of files and symbols with line numbers, which the schema only calls 'Directory to zoom into'. The remaining parameters (root, limit, format, tokens) are left entirely to the schema.

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 names a specific resource (the repository) and enumerates exactly what the map contains: modules/communities, PageRank-central files, most-used symbols, and entry points. The opening 'Start here' positions it relative to the sibling tools (search, trace, impact) as the orientation step, so an agent can tell what it gets without opening the schema.

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?

It gives clear when-to-use guidance ('Start here') and a concrete drill-down path ('Pass focus to zoom in'). It does not name a when-not condition or explicitly route to a named sibling for follow-up questions, which keeps it short of a 5.

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

Deploy Server

Other Tools