Skip to main content
Glama

project_map

Generate a compact codebase map of files with token sizes and optional symbols before exploring, so agents avoid listing directories or opening files.

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.

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".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
detailNofiles
subpathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose non-obvious runtime behavior: it indexes the project on first use and resyncs changed files by checksum on every call. It does not discuss cost/latency on large repos, read-only guarantees, or failure modes for an invalid path, so it is strong but not complete.

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?

Front-loaded purpose sentence, then the behavioral/usage line, then a compact Args block. Every sentence earns its place and nothing is repeated between the prose and the parameter list.

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?

An output schema exists, so return values need no explanation; the description covers the remaining agent-relevant questions, namely when to reach for it and what each parameter controls, including the cost trade-off between detail levels.

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 description coverage is 0%, so compensation is required and the Args block delivers it: path is the absolute project root, detail distinguishes 'files' (cheapest) from 'symbols' (adds methods/classes with first-last line), and subpath is scoped with a concrete example ('src/main'). This adds real meaning the bare schema does not carry.

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?

States a specific artifact (a compact map of a codebase: files with token sizes, optionally symbols and line ranges) rather than a vague action. The line 'Call it before exploring a project instead of listing directories and opening files' implicitly separates it from siblings like find_code and read_file, so an agent can route correctly without opening a 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?

Explicitly prescribes the situation to use it ('before exploring a project') and names the alternative behaviors it replaces (listing directories, opening files). It stops short of when-not-to-use guidance (e.g. single-file lookups where read_file suffices), but the intended context is unambiguous.

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