Skip to main content
Glama

codegraph_index

Index files or directories to build a code graph with symbols, call relationships, and imports. Use for explicit re-indexing or custom paths; search auto-indexes on first use.

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#. Note: codegraph_search auto-indexes on first use, so you only need this for explicit re-indexing or custom paths.

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.
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It does more than declare a side effect: it identifies the content extracted, supported languages, recursive directory handling implied by the schema, and the auto-index relationship. It does not, however, clarify whether re-indexing replaces existing data or what completion signals are returned.

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: the first gives the action and resource, the second adds the auto-index note and language coverage. It is front-loaded and contains no redundant filler; the language list and auto-index clarification are relevant, targeted details.

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 description, together with the schema, covers inputs, supported languages, recursive indexing, and the primary usage situation. There is no output schema, and the description does not explicitly state what the tool returns or how the agent will know indexing completed, which is a modest gap. Overall, though, it gives enough context for selection and invocation.

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?

Because there is 100% schema description coverage for all parameters, the schema already provides complete meanings. The description does not add meaningful new parameter semantics beyond reinforcing that paths/directions use recursive index behavior. The baseline 3 applies, as no important param context is missing.

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 ('Index') with a concrete resource ('a file or directory into the code graph') and explains what is extracted: symbols, call relationships, and imports. It also differentiates the tool from sibling search tools by noting that codegraph_search auto-indexes, so this tool is for explicit re-indexing or custom paths.

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?

It explicitly states when this tool is needed: 'only need this for explicit re-indexing or custom paths,' and when it is not needed: because 'codegraph_search auto-indexes on first use.' This gives agents a clear 'when to use vs. alternative' guideline.

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

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