Skip to main content
Glama

code_graph_index

Index a repository's Python and JS/TS files into a local SQLite symbol graph, capturing symbols, imports, and file stats. Run once before read tools to enable code analysis.

Instructions

Index a repository's Python + JS/TS files into a local SQLite symbol graph (symbols, import/inherit edges, per-file stats). Run once before the read tools. Pure stdlib ast — no network, no Postgres, no external CLI.

repo_root (required): the directory to index. db_path: override the graph DB location (default $WILLOW_HOME/code_graph/graph.db, or WILLOW_CODE_GRAPH_DB). force: reserved (the indexer upserts, so re-running is already idempotent).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
app_idYes
db_pathNo
repo_rootYes
Behavior5/5

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

The description adds substantial behavior beyond annotations: it writes to a local SQLite DB, uses no network/Postgres/external CLI, is idempotent because it upserts, and documents the default DB path and environment override. This is exactly the kind of context the annotations do not already provide, especially the safety and rerun implications.

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 well-structured and front-loaded: it states the operation, the usage timing, the environment constraints, and per-parameter notes in just a few sentences. Each sentence adds useful information, with no filler or redundant restating of the tool name.

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?

For a 4-parameter tool with no output schema and minimal annotations, the description covers most context: operation, storage, idempotence, environment, and rerun behavior. However, the mandatory app_id parameter is entirely undocumented, which leaves a critical gap for an agent trying to construct a valid call. Otherwise it would be complete.

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 schema has 0% description coverage, so the description must carry the parameter documentation load. It does explain repo_root, db_path, and force, but it completely omits app_id, which is a required parameter in the schema. An agent could not reliably call this tool without understanding app_id, so the parameter documentation is materially incomplete.

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 states a specific action and resource: indexing a repository's Python and JS/TS files into a local SQLite symbol graph. It also describes what the graph contains (symbols, import/inherit edges, per-file stats) and clearly separates this setup operation from the sibling 'read tools' like code_graph_search and code_graph_explain.

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 gives clear usage context: 'Run once before the read tools.' This tells an agent when it should be used relative to the code_graph_* siblings. It does not explicitly enumerate when-not-to-use it or name the exact alternative tools, so it falls short of a perfect 5.

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/willow-memory/willow-mcp'

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