Skip to main content
Glama
aimasteracc

tree-sitter-analyzer

by aimasteracc

structure

Read-onlyIdempotent

Perform structural code analysis by invoking actions such as analyze, outline, class tree, signatures, and explore. Request help with a target action to get its exact schema.

Instructions

Code-intelligence (codegraph-compatible) structural analysis facade. Actions: analyze, ast_path, class_detail, class_tree, explore, outline, read, signatures, sitemap. Pass action=help with target_action for an exact action schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoAction sub-mode (e.g. summary|cycles).
limitNoMax results.
queryNoSearch query/pattern.
scopeNoAction discriminator (e.g. point|graph).
actionYesWhich business capability to invoke, or help for discovery. One of: analyze, ast_path, class_detail, class_tree, explore, help, outline, read, signatures, sitemap
symbolNoSymbol/function name.
languageNoLanguage hint (usually auto).
file_pathNoTarget file path.
class_nameNoClass name for class_tree and class_detail actions.
function_nameNoFunction name (alias of symbol).
output_formatNoOutput format: JSON.
target_actionNoBusiness action to describe when action is help.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.2.0
    • changedInput schema / properties / action / description
      Previous value: -"Which capability to invoke. One of: analyze, ast_path, class_detail, class_tree, explore, outline, read, signatures, sitemap"New value: +"Which business capability to invoke, or help for discovery. One of: analyze, ast_path, class_detail, class_tree, explore, help, outline, read, signatures, sitemap"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "analyze",
      -  "ast_path",
      -  "class_detail",
      -  "class_tree",
      -  "explore",
      -  "outline",
      -  "read",
      -  "signatures",
      -  "sitemap"
      -]New value: +[
      +  "analyze",
      +  "ast_path",
      +  "class_detail",
      +  "class_tree",
      +  "explore",
      +  "help",
      +  "outline",
      +  "read",
      +  "signatures",
      +  "sitemap"
      +]
    • addedInput schema / properties / target_action
      Added value: +{
      +  "description": "Business action to describe when action is help.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv1.30.0
    • changedInput schema / properties / output_format / description
      Previous value: -"Output format (toon|json)."New value: +"Output format: JSON."
    • addedInput schema / properties / output_format / enum
      Added value: +[
      +  "json"
      +]
  3. Changed1 schema field changedv1.25.0
    • addedInput schema / properties / class_name
      Added value: +{
      +  "description": "Class name for class_tree and class_detail actions.",
      +  "type": "string"
      +}
  4. First observedv1.23.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the 'codegraph-compatible' context and the help mechanism for obtaining action schemas, which gives some behavioral guidance beyond annotations. It does not contradict any annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences and front-loaded with the purpose, listing the actions compactly. It avoids unnecessary fluff and is appropriately sized for a facade tool, though the 'codegraph-compatible' jargon may be slightly opaque.

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?

Given the tool's complexity (12 parameters, 10 actions), the description is not fully self-contained but offers a clear path to completeness via the help action. It does not describe return values, but with no output schema and the help mechanism, it provides an adequate entry point for an agent to discover details.

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?

The schema has 100% description coverage for all 12 parameters, so the schema already documents each parameter. The description adds the specific instruction that action=help with target_action returns an exact action schema, which adds meaning to those parameters, but it does not elaborate on other parameters beyond the schema, keeping it at the baseline.

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 identifies the tool as a 'structural analysis facade' for code intelligence and lists the supported actions (analyze, ast_path, class_detail, etc.), giving a clear sense of its purpose. It distinguishes itself from siblings by the codegraph-compatible facade framing, but it does not explain what 'structural analysis' entails beyond the action names, so it is not fully specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no comparison with sibling tools (search, nav, health, edit, etc.) or guidance on when to choose this facade over alternatives. The only usage hint is 'Pass action=help with target_action for an exact action schema,' which tells how to discover details but not when to use the tool contextually.

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