Skip to main content
Glama

codebase_analyze

Analyzes codebases to extract structure, call graphs, and relationships, storing insights as persistent memories for future reference. Processes only changed files for efficiency.

Instructions

Analyze a codebase and store its structure as Cortex memories. Uses tree-sitter AST for cross-file resolution, call graphs, and community detection. Incremental: only processes changed files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryNo
languagesNo
max_filesNo
max_file_size_kbNo
incrementalNo
dry_runNo
domainNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it stores data as memories (implying persistence), uses tree-sitter AST for analysis (specifying the method), handles cross-file resolution and call graphs (detailing scope), and is incremental (explaining performance behavior). It lacks details on permissions, rate limits, or error handling, but covers significant operational aspects.

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 appropriately sized and front-loaded, with two sentences that efficiently convey the core functionality and a key behavioral trait (incremental processing). Every sentence adds value without redundancy, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (codebase analysis with multiple parameters) and the presence of an output schema (which reduces need to explain return values), the description is partially complete. It covers the main purpose and some behavior but lacks parameter explanations and details on prerequisites or limitations, leaving gaps for effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 7 parameters with 0% description coverage, meaning none are documented in the schema. The description does not mention any parameters, failing to compensate for this gap. It does not explain what 'directory', 'languages', 'max_files', etc., mean or how they affect the analysis, leaving semantics unclear.

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's purpose with specific verbs ('analyze', 'store') and resources ('codebase', 'Cortex memories'), and distinguishes it from siblings by mentioning unique capabilities like tree-sitter AST processing, cross-file resolution, call graphs, and community detection. It goes beyond a simple restatement of the name.

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 implies usage context through 'incremental: only processes changed files', which suggests when to use it for efficiency. However, it does not explicitly state when to use this tool versus alternatives like 'detect_domain' or 'explore_features', nor does it provide exclusions or prerequisites. The guidance is present but not comprehensive.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cdeust/Cortex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server