Skip to main content
Glama
wrale

mcp-server-tree-sitter

by wrale

analyze_complexity

Measure and evaluate code complexity by analyzing specific files within a project. Outputs detailed complexity metrics to enhance codebase understanding and maintainability.

Instructions

Analyze code complexity.

    Args:
        project: Project name
        file_path: Path to the file

    Returns:
        Complexity metrics
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
projectYes
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Returns: Complexity metrics' but doesn't disclose behavioral traits like whether this is a read-only operation, computational cost, rate limits, or what happens with invalid inputs. The description is minimal and lacks essential operational context.

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 appropriately sized and front-loaded with the main purpose. The Args/Returns structure is clear, though the content within is sparse. No redundant sentences are present, making it efficient but under-specified.

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

Completeness2/5

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

Given the tool's complexity (code analysis with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'complexity metrics' entail, how they're computed, or provide enough context for reliable agent use, falling short of minimum viability.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It lists parameters 'project' and 'file_path' with brief labels but adds minimal meaning beyond the schema's titles. No details on format, constraints, or examples are provided, leaving significant gaps in understanding.

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

Purpose3/5

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

The description states the tool's purpose as 'Analyze code complexity', which is clear but vague. It specifies the action ('analyze') and resource ('code complexity'), but doesn't distinguish it from potential siblings like 'analyze_project' or provide specific details about what complexity analysis entails.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'analyze_project' and 'get_ast' that might relate to code analysis, the description lacks any context about appropriate use cases, prerequisites, or exclusions.

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

Related 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/wrale/mcp-server-tree-sitter'

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