Skip to main content
Glama
aimasteracc

tree-sitter-analyzer

index

Manage code index lifecycle with actions to check health, build full index, sync changes, and query AST cache.

Instructions

Code-intelligence (codegraph-compatible) index lifecycle hub. Covers codegraph_status, codegraph_full_index, codegraph_autoindex, codegraph_incremental_sync, and AST cache query in one tool. Pick a capability via action:

READ-ONLY:

  • action=status — check codegraph index health without writing (codegraph_status equivalent). Returns node/edge counts, staleness, and error indicators. Params: (none).

  • action=cache — query the raw AST cache for symbols, types, and references (read-only modes: search, lookup, stats, changes, watch_status). NOTE: this action ALSO exposes mutating cache modes via mode — index, sync, invalidate, watch_start, watch_stop (and force=true to force a reindex). Params: mode (default search/stats), query, file_path, kind, limit, force.

WRITES ON-DISK INDEX:

  • action=build — full (re)build of the project index. Slow; use when index is absent or corrupt. Params: force.

  • action=full — force a complete full reindex (codegraph_full_index equivalent). Params: (none).

  • action=auto — enable/configure background auto-indexing (codegraph_autoindex equivalent). Params: enable, watch.

  • action=sync — run one incremental sync pass (fast; use after editing files, codegraph_incremental_sync equivalent). Params: paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich capability to invoke. One of: auto, build, cache, full, status, sync
scopeNoAction discriminator (e.g. point|graph).
modeNoAction sub-mode (e.g. summary|cycles).
file_pathNoTarget file path.
symbolNoSymbol/function name.
function_nameNoFunction name (alias of symbol).
queryNoSearch query/pattern.
languageNoLanguage hint (usually auto).
limitNoMax results.
output_formatNoOutput format (toon|json).
Behavior5/5

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

Annotations set readOnlyHint=false and destructiveHint=false, but the description transparently details which actions are read-only (status, cache in certain modes) and which write to disk. It warns about potential mutating modes in the cache action and notes performance implications (e.g., 'Slow' for build). No contradiction with annotations.

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-organized with bullet points and clear sections. It front-loads the purpose, then lists actions with their behavior and parameters. Every sentence adds value without redundancy.

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

Completeness5/5

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

Despite having no output schema, the description explains what each action returns (e.g., 'Returns node/edge counts, staleness, and error indicators' for status). It covers all 10 parameters and 6 actions comprehensively, making the tool self-contained.

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

Parameters5/5

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

Schema coverage is 100% with parameter descriptions, but the description adds significant value by specifying which parameters apply to each action (e.g., 'Params: (none)' for status, detailed params for cache). This goes beyond the schema's generic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool is an 'index lifecycle hub' covering multiple codegraph actions. It lists specific capabilities via the `action` parameter. However, it does not explicitly differentiate this tool from siblings like 'search' or 'nav', which might handle some overlap.

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 provides guidance on when to use each action (e.g., 'use when index is absent or corrupt' for build, 'run after editing files' for sync). It distinguishes read-only vs write actions. Missing explicit when-not-to-use or alternatives, but context is clear.

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/aimasteracc/tree-sitter-analyzer'

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