Skip to main content
Glama
aimasteracc

tree-sitter-analyzer

project

Analyze project structure, metrics, and code health. Manage architectural decisions and sync documentation.

Instructions

Code-intelligence (codegraph-compatible) project-intelligence hub. Covers codegraph_metrics (graph-level stats), project overview, file enumeration, smart task-focused context, parser readiness, agent skills/workflow, decision journal, and doc sync in one tool. Pick a capability via action:

PROJECT INFO (read-only):

  • action=overview — high-level summary of languages, entry points, and architecture. Best first call on an unfamiliar repo. Params: format.

  • action=files — enumerate source files with filtering. Params: path, extensions, limit, format.

  • action=smart — one-shot orientation for a single file: file_health grade, exported symbols (the file's public API), upstream/downstream dependencies, associated test files, and edit-risk in one envelope (replaces Read + file_health + dependency_analysis + safe_to_edit). Params: file_path.

  • action=parser — check tree-sitter parser readiness for the project languages. Params: format.

  • action=tools — verify availability of CLI tools (ripgrep, fd, etc.). Params: (none).

  • action=metrics — codegraph graph-level statistics (node/edge counts, top hubs, codegraph_metrics equivalent). Params: format.

  • action=skills — enumerate available agent skills for this project. Params: format.

  • action=workflow — recommended agent workflow for the current task type. Params: task_type, format.

DECISION + DOC (may write):

  • action=journal — persistent architectural decision journal. Params: mode (record/get/search/supersede), title, rationale, verdict, query, verdict_filter, id, new_id, scope_paths, alternatives, related_symbols, tags, path_scope, limit.

  • action=doc_sync — sync documentation to current code state. Params: path, dry_run.

For index lifecycle (status/build/full/auto/sync/cache), use the index facade instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich capability to invoke. One of: doc_sync, files, journal, metrics, overview, parser, skills, smart, tools, workflow
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?

The description discloses behavioral traits beyond annotations: it separates actions into read-only and may-write categories, indicates that overview is ideal for first use, and advises using a different tool for index lifecycle. Annotations (readOnlyHint=false) are consistent with the mixed read/write nature.

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 with a clear overview followed by grouped actions in bullet points. It is front-loaded with the purpose and every sentence adds value. No unnecessary text.

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?

Given 10 parameters and no output schema, the description covers all actions, their parameters, usage hints, and cross-tool guidance. It is fully self-contained for an agent to understand when and how to invoke the tool.

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

Parameters4/5

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

With 100% schema coverage, the description adds value by grouping parameters per action and explaining their role in context (e.g., 'Params: path, extensions, limit, format' for files). This provides semantic context beyond the schema's property descriptions.

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 defines the tool as a 'project-intelligence hub' with specific capabilities. It enumerates all actions and distinguishes from the sibling tool 'index' for lifecycle operations. The purpose is specific and not a tautology.

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 explicit guidance for when to use each action, e.g., 'Best first call on an unfamiliar repo' for overview, and recommends the 'index' facade for index lifecycle. However, it does not compare against all siblings like 'edit' or 'nav'.

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