Skip to main content
Glama

get_codebase_map

Generate a token-efficient AST symbol outline of a repository, listing classes, functions, and interfaces to help AI agents understand code structure while reducing token usage.

Instructions

Extracts a token-efficient AST symbol outline map (classes, functions, interfaces) of the repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootDirNoPath to repository root directory (default: current working directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that this is an extraction/read-like operation producing a token-efficient outline, which is helpful context. It does not mention return format, traversal limits, or side-effect guarantees, so transparency is partial.

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?

The description is a single sentence that front-loads the key value ('token-efficient') and clearly states the output type and scope. Every phrase contributes useful information with no redundancy or filler.

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?

The tool is simple with one optional parameter fully documented in the schema. The description conveys what the result is (AST symbol outline map of classes, functions, interfaces) even though there is no output schema. Minor gaps are the absence of explicit sibling routing and output formatting details, but these are not critical for such a simple 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% and the sole parameter (rootDir) is already described in the input schema, including its default behavior. The description adds no additional parameter-level meaning, 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?

The description uses a specific verb ('Extracts') and a concrete resource ('AST symbol outline map'), lists the symbol types included (classes, functions, interfaces), and states the scope ('of the repository'). This clearly distinguishes it from the file-scoped sibling read_file_outline and from the broader extract_relevant_context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives or mention sibling tools. However, 'token-efficient' and 'of the repository' imply it is intended for obtaining a repository-wide symbol overview with low token cost, which is useful but only implied guidance.

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