Skip to main content
Glama

codegraph_index

Index source code to build a searchable graph of symbols, calls, and imports. Prepares project structure for code analysis and impact queries.

Instructions

Index a file or directory into the code graph. Extracts symbols (functions, classes, methods), call relationships, and imports. Supports TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, C#. Run this before using codegraph_search, codegraph_callers, codegraph_callees, or codegraph_impact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe file or directory path to index. For directories, all supported files are indexed recursively.
team_idNoThe team ID for isolation.
max_filesNoMaximum number of files to index (for directory mode).
repo_pathNoThe root path of the repository. Used to compute relative file paths. Defaults to the path argument.
Behavior3/5

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

No annotations are present, so the description carries the full burden. It discloses the indexing behavior and the extracted symbol types, but does not mention side effects (e.g., persistent state changes), success/failure indicators, or performance implications. Provides some transparency but not comprehensive coverage.

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, front-loaded with the primary action, followed by supporting details (extracted information, supported languages, prerequisite usage). Every sentence earns its place with no redundancy.

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?

With no annotations and no output schema, the description needs to cover return values and behavioral details. It explains purpose, languages, and the prerequisite relationship, but omits any mention of what the tool returns or how to confirm successful indexing. This is a noticeable gap for an agent orchestrating a workflow.

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% for all 4 parameters, so the baseline is 3. The description does not add significant parameter-specific detail beyond the schema, though it provides overall context for how the path is used. It adds minimal value over 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's function: 'Index a file or directory into the code graph' and details what it extracts (symbols, call relationships, imports). It distinguishes from sibling tools by explicitly noting it must be run before codegraph_search, codegraph_callers, codegraph_callees, and codegraph_impact.

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

Usage Guidelines5/5

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

Explicitly instructs 'Run this before using codegraph_search, codegraph_callers, codegraph_callees, or codegraph_impact', giving clear when-to-use guidance and naming dependent tools. Also lists supported languages, helping the agent decide if a given file is eligible for indexing.

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/tinhien11/remem-mcp'

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