Skip to main content
Glama
aimasteracc

tree-sitter-analyzer

by aimasteracc

health

Read-onlyIdempotent

Run code health checks to detect dead code, unreachable paths, dependency issues, and test gaps. Use actions like file, deps, or overview to analyze project structure and identify refactoring targets.

Instructions

Code-intelligence (codegraph-compatible) health and analysis facade. Actions: dead, deps, file, heatmap, imports, matrix, middleware, overview, patterns, project, refactor_queue, routes, scale, self, test_gap, unreachable. Pass action=help with target_action for an exact action schema. Cost: action=project is slow (prefer health action=file (one file, warm)).

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: dead, deps, file, heatmap, help, imports, matrix, middleware, overview, patterns, project, refactor_queue, routes, scale, self, test_gap, unreachable
symbolNoSymbol/function name.
languageNoLanguage hint (usually auto).
file_pathNoTarget file path.
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: dead, deps, file, heatmap, imports, matrix, middleware, overview, patterns, project, refactor_queue, routes, scale, self, test_gap, unreachable"New value: +"Which business capability to invoke, or help for discovery. One of: dead, deps, file, heatmap, help, imports, matrix, middleware, overview, patterns, project, refactor_queue, routes, scale, self, test_gap, unreachable"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "dead",
      -  "deps",
      -  "file",
      -  "heatmap",
      -  "imports",
      -  "matrix",
      -  "middleware",
      -  "overview",
      -  "patterns",
      -  "project",
      -  "refactor_queue",
      -  "routes",
      -  "scale",
      -  "self",
      -  "test_gap",
      -  "unreachable"
      -]New value: +[
      +  "dead",
      +  "deps",
      +  "file",
      +  "heatmap",
      +  "help",
      +  "imports",
      +  "matrix",
      +  "middleware",
      +  "overview",
      +  "patterns",
      +  "project",
      +  "refactor_queue",
      +  "routes",
      +  "scale",
      +  "self",
      +  "test_gap",
      +  "unreachable"
      +]
    • addedInput schema / properties / target_action
      Added value: +{
      +  "description": "Business action to describe when action is help.",
      +  "type": "string"
      +}
  2. Changed4 schema fields changedv1.30.0
    • changedInput schema / properties / action / description
      Previous value: -"Which capability to invoke. One of: dead, deps, file, heatmap, imports, matrix, overview, patterns, project, routes, scale, test_gap"New value: +"Which capability to invoke. One of: dead, deps, file, heatmap, imports, matrix, middleware, overview, patterns, project, refactor_queue, routes, scale, self, test_gap, unreachable"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "dead",
      -  "deps",
      -  "file",
      -  "heatmap",
      -  "imports",
      -  "matrix",
      -  "overview",
      -  "patterns",
      -  "project",
      -  "routes",
      -  "scale",
      -  "test_gap"
      -]New value: +[
      +  "dead",
      +  "deps",
      +  "file",
      +  "heatmap",
      +  "imports",
      +  "matrix",
      +  "middleware",
      +  "overview",
      +  "patterns",
      +  "project",
      +  "refactor_queue",
      +  "routes",
      +  "scale",
      +  "self",
      +  "test_gap",
      +  "unreachable"
      +]
    • 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. First observedv1.23.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior; the description adds a performance cost warning (project is slow, file is warm) and the help-introspection mechanism. It does not detail response shapes, but with annotations present the added behavioral context is sufficient.

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 compact and front-loads the action list, then the help mechanism, then the cost caveat. The action enumeration is long but earns its place for a facade with many subcommands; slight redundancy with the enum prevents a 5.

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?

For a multi-action facade with no output schema, the description supplies a bootstrap mechanism (help + target_action) to obtain exact action schemas and warns about the expensive action. It does not spell out every action's meaning or return format, but the help mechanism and complete parameter schema make it reasonably complete.

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?

Schema coverage is 100%, so the baseline is 3; the description adds value by explaining the target_action parameter in conjunction with action=help and by highlighting project versus file cost behavior. This goes beyond the generic property 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 identifies the tool as a code-intelligence/analysis facade and enumerates its concrete actions, so an agent can see it is a read-only analysis dispatcher rather than a search or edit operation. It stops short of explicitly contrasting these actions with sibling tools like search or project, but the action list provides enough differentiation.

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?

It gives actionable usage guidance: use action=help with target_action to get an exact schema, and prefer action=file over slow action=project. It does not explicitly state when to use this facade versus siblings, so it misses the 'alternatives' part of a 5.

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