Skip to main content
Glama

code_map

Read-only

Find where code lives by ranking a local repository's source files by relevance to a query and summarising key symbols, without returning file bodies.

Instructions

Rank a local repo's source files by relevance to a query (tree-sitter symbol graph + PageRank) and summarise their key symbols. Read-only. Use to find where code lives; it does not return file bodies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNoRepository root to scan (default: current working directory)
queryYesNatural-language or identifier query (e.g. a function/type name)
max_filesNoMax ranked files to return (default 15, 1 to 100)
chat_filesNoRepo-relative paths already in context; their symbols bias the ranking. Either this or query must be non-empty

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.74.0
    • changedInput schema / properties / chat_files / description
      Previous value: -"Array of repo-relative paths already in context; their symbols bias the ranking"New value: +"Repo-relative paths already in context; their symbols bias the ranking. Either this or query must be non-empty"
    • addedInput schema / properties / chat_files / items
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / chat_files / type
      Previous value: -"string"New value: +"array"
    • changedInput schema / properties / max_files / description
      Previous value: -"Max ranked files to return (default 15, cap 100)"New value: +"Max ranked files to return (default 15, 1 to 100)"
    • changedInput schema / properties / max_files / type
      Previous value: -"string"New value: +"integer"
  2. First observedv1.73.3

TDQS

A4.2/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 the "Read-only" claim is partly redundant. However, the description adds genuinely useful behavioral detail the annotations cannot: the ranking mechanism, the summarisation output shape, and the negative constraint that file bodies are not returned.

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 tight sentences with no waste: the first front-loads what the tool does and how, the second gives usage guidance and the key exclusion. Nothing is padded.

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 and four parameters, the description still covers enough: it indicates the return shape (ranked files plus summarised key symbols) and what is not returned. It is nearly complete for a read-only query tool, though it does not mention result counts or ordering guarantees beyond max_files.

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 description coverage is 100%, so every parameter (root, query, max_files, chat_files) is already documented in the schema. The description adds no syntax, format, or inter-parameter detail beyond that, so the baseline of 3 applies.

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 verb (rank/summarise) and resource (a local repo's source files) plus the mechanism (tree-sitter symbol graph + PageRank). None of the sibling tools (memory_*, wiki_*) do repo ranking, so the scope is unambiguous.

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?

"Use to find where code lives" gives clear usage context, and "it does not return file bodies" explicitly rules out a plausible alternative expectation (reading file contents). No sibling tool is named as an alternative, but the sibling set is disjoint so this is a minor gap.

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