Skip to main content
Glama

code.understand

Analyze a file or directory to extract purpose, key exports, data flow, dependencies, and complexity hotspots, replacing the need to read multiple files.

Instructions

Get compressed understanding of a file or directory — purpose, key exports, data flow, dependencies, complexity hotspots. Replaces reading 10+ files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile or directory path to understand

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It discloses that the output is compressed and what it includes, and 'Get' implies a read-style operation, but it does not explicitly confirm that the tool is read-only or non-destructive, nor does it mention permissions, rate limits, or performance trade-offs. It adds some useful behavioral context beyond the schema, but key operational traits remain unstated.

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 two sentences with no filler: the first states the core value and the second quantifies the benefit. It is front-loaded with the most important information and every clause earns its place.

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?

For a single-parameter read-oriented tool with no output schema, the description is nearly complete: it explains what the tool returns and why it is useful. It could be stronger by stating that it is read-only or by clarifying directory recursion behavior, but the core information an agent needs to invoke it correctly is present.

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 documents the single 'path' parameter at 100% coverage, including that it can be a file or directory. The description says 'a file or directory' but adds no format, syntax, or constraint details beyond what the schema already provides. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 gives a specific verb and resource: compressed understanding of a file or directory. It also enumerates the output categories (purpose, key exports, data flow, dependencies, complexity hotspots), making the tool's function clear. It does not, however, differentiate itself from sibling tools such as code.map, code.symbols, or code.trace, so an agent cannot fully separate them based on this description alone.

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 phrase 'Replaces reading 10+ files' implies a usage context: use this instead of manually reading many files for an overview. However, the description does not explicitly state when to use this tool versus code.map, code.symbols, or code.trace, nor does it give any when-not conditions or prerequisites. Usage is therefore implied but not well specified.

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