Skip to main content
Glama

project_map

Generate a compact token-budgeted map of a codebase before exploring it, showing files, sizes, and optional symbols or line ranges to know which directories to zoom into.

Instructions

Compact map of a codebase: files with their size in tokens, optionally their symbols and line ranges.

Call it before exploring a project instead of listing directories and opening files. Indexes the project on first use and resyncs changed files by checksum on every call. The map fits a token budget: on a large project it says which directories to zoom into.

Args: path: Project root directory (absolute). detail: "files" (cheapest) or "symbols" (adds methods/classes with first-last line). subpath: Restrict to a directory inside the project, e.g. "src/main". scope: "main" (leave tests out, default), "test" or "all".

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": {
      "path": "<path>"
    },
    "name": "project_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
scopeNomain
detailNofiles
subpathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.0
    • addedInput schema / properties / scope
      Added value: +{
      +  "default": "main",
      +  "title": "Scope",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the load and does well: it discloses that the project is indexed on first use (a side effect with latency), that changed files are resynced by checksum on every call, and that output is capped to a token budget with directory hints when truncated. It does not say where the index lives on disk or whether indexing requires any permissions, leaving a small gap for a tool that clearly writes state.

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 the single-sentence purpose, then usage, then behavior, then a compact Args block. Every line earns its place; the only mild redundancy is restating parameter names already visible in the schema.

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?

An output schema exists, so return format need not be explained, and the description still covers indexing side effects, refresh behavior, truncation, and all four parameters. Nearly complete for a read-oriented inspection tool; the remaining gap is any note on index persistence or permission requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema carries only bare titles with no enums, so the description is doing all the work: it defines path as an absolute project root, enumerates detail values with relative cost, gives a subpath example ('src/main'), and spells out scope values including the 'main' default that excludes tests. This is exactly the meaning the schema omits.

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 states a concrete artifact: a compact map of a codebase with files, token sizes, and optional symbols/line ranges. It distinguishes itself from generic exploration ('instead of listing directories and opening files'), though it never names sibling tools like read_file or find_code, so an agent must infer the boundary.

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?

Explicit timing guidance: 'Call it before exploring a project instead of listing directories and opening files,' plus cost ordering between detail modes ('files' is cheapest) and what to do on a large project (zoom into the named directories). It lacks explicit when-not-to-use conditions or named alternatives, which keeps it below 5.

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