Skip to main content
Glama

Codebase Map

get_codebase_map
Read-onlyIdempotent

Get the current codebase map for a product: module labels, counts, and summary to answer where code lives and guide architecture discussions.

Instructions

The auto-generated codebase brain map for one product: a plain-language summary, the module/node/edge counts, when the map was last generated, and the labels of the modules it found. Read-only; returns the latest generated map, empty when none has been generated for the product yet. Use it to ground 'where in the code does X live?' questions and to see how the codebase splits into modules before discussing architecture or scoping engineering work. Optional product_id, from whoami; omit for the org's primary product.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idNoProduct id, from whoami (optional; the org's primary product when omitted).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.14

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds that it returns the latest generated map and is empty when none generated, which is useful behavioral context beyond the annotations. No contradictions.

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 succinct yet information-dense. Three sentences cover content, behavior, use case, and parameter guidance without redundancy or fluff.

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?

For a simple read-only tool with one optional parameter and no output schema, the description fully covers purpose, return contents, empty behavior, use case, and parameter handling. The annotations cover safety properties, making the description complete.

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?

The schema already provides 100% coverage of the product_id parameter, including its optionality and default behavior. The description repeats this information almost verbatim, adding no additional semantic meaning beyond 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 clearly states the tool returns an auto-generated codebase brain map for a product, listing specific contents (plain-language summary, module/node/edge counts, last generated timestamp, module labels). It uses a specific verb and resource, and the detailed content distinguishes it from any sibling tools.

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?

The description explicitly says to use it to ground 'where in the code does X live?' questions and to see how the codebase splits into modules before discussing architecture or scoping work. This is clear context for when to use it, though it does not explicitly name alternatives or exclusion cases.

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