Skip to main content
Glama
padobrik

MCP Context Graph

by padobrik

index_project

Scan project files to build a code graph: extracts definitions and resolves call/import relationships across Python, TypeScript, and JavaScript. Use force for a full rebuild or view indexing stats.

Instructions

(Re)index the project to build the code graph. Scans Python, TypeScript, and JavaScript files, extracts definitions, and resolves call/import relationships. Indexing also happens automatically on the first query; use this tool with force=true for a full rebuild, or to see indexing stats and the context-footprint reduction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the project directory to index. If not provided, uses the project root configured at server startup. Example: '/path/to/my-project'
forceNoForce full re-indexing even if files haven't changed. Set to true to rebuild the entire graph from scratch.
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses key behaviors: scanning file types, extracting definitions, resolving relationships, automatic indexing on first query, and the ability to force a full rebuild. It stops short of detailing side effects like performance impact or overwriting behavior, but the core behavior is well covered.

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 purpose, and every clause adds value. It efficiently conveys scope, automatic behavior, and usage options without redundancy.

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?

Given only two optional parameters and no output schema, the description adequately covers what the tool does, when to use it, and what to expect (stats and context-footprint reduction). It could mention error conditions or return format, but for this simplicity level, it is sufficiently 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?

Schema coverage is 100% and both parameters have descriptions that fully explain their meaning and defaults. The tool description mentions 'force=true' and path indirectly, but adds no new semantic information beyond what the schema already provides, so the baseline of 3 is appropriate.

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 a specific verb ('index') and resource ('project to build the code graph'). It also specifies file types scanned and what relationships are resolved, making it distinct from sibling tools like find_symbol or get_context which query the graph.

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 clarifies that indexing happens automatically on first query, implying the tool is usually unnecessary unless a full rebuild is needed or stats are desired. It provides clear context for when to use it with force=true, though it doesn't explicitly mention alternative tools.

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/padobrik/mcp-context-graph'

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