Skip to main content
Glama
aimasteracc

tree-sitter-analyzer

viz

Read-onlyIdempotent

Create UML diagrams, call graphs, and find duplicate code to improve code quality.

Instructions

Code-intelligence (codegraph-compatible) visualization and similarity facade. Covers codegraph_uml (UML diagrams), codegraph_visualize (call/dependency graph visualizations), and codegraph_similarity (duplicate code detection) in one tool. Pick a capability via action:

  • action=uml — UML class or sequence diagrams (codegraph_uml equivalent). Params: diagram, source, target, max_edges, max_depth, max_paths, package_depth, include_external_bases, file_path, class_name, include_tests.

  • action=graph — call/dependency graph visualizations (codegraph_visualize equivalent). Params: mode, file_path, function, depth, max_edges, direction.

  • action=similarity — duplicate / near-duplicate code detection (codegraph_similarity equivalent). Default response is a summary map (files, line ranges, scores — no bodies). Params: mode, min_lines, min_group_size, max_groups, use_cache, include_bodies (set include_bodies=true to add code snippets; omit for the compact default).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhich capability to invoke. One of: graph, similarity, uml
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).
max_groupsNoaction=similarity: max clone groups to return (default: 20).
min_linesNoaction=similarity: min function body lines to consider (default: 5).
min_group_sizeNoaction=similarity: min clone group size to report (default: 2).
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, so the description adds value by explaining default behaviors (e.g., similarity returns a summary map without bodies by default, option to include bodies). It also lists per-action parameters, providing additional context beyond what annotations offer.

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 well-structured with clear action breakdowns and parameter lists. It is front-loaded with the overall purpose and then details each action. Every sentence adds value, though it could be slightly more concise without losing clarity.

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 (3 sub-tools, 13 parameters), the description covers key actions and their parameters but has gaps. For graph and UML actions, the return format is not described. The 'mode' and 'scope' parameters are not explained in the description, only in the schema. This leaves some ambiguity for the agent.

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?

Schema coverage is 100%, so baseline is 3. The description adds semantic grouping by action and mentions defaults for similarity params (min_lines, min_group_size, max_groups). However, many parameters (scope, mode, file_path, etc.) are only described in the schema, not in the description. The description adds some but not full compensation.

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 states the tool is a 'visualization and similarity facade' covering UML diagrams, call/dependency graphs, and duplicate code detection. It distinguishes these three capabilities and implicitly differentiates from sibling tools like search or edit by specifying the visualization/similarity domain.

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

Usage Guidelines3/5

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

The description lists the three actions and their parameters, implying when each should be used (e.g., 'action=uml for UML diagrams'). However, it does not provide explicit guidance on when not to use this tool versus alternatives (e.g., using search for code queries). Usage is implied but not contrasted with sibling tools.

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