Skip to main content
Glama

Analyze code quality

analyze
Read-onlyIdempotent

Reviews an indexed project or path for complex or long functions, large classes, dead code, module dependencies, and an overall quality score; read-only.

Instructions

Review the quality of the indexed project, or of one path: the most complex functions, long functions, large classes, dead code (functions with no static caller), module dependencies and an overall quality score. Use it for "what is the most complex code", "review this directory", "is there dead code". Pass path (relative) to limit it to a directory or file. Read-only. Complexity is cyclomatic and approximate, and dead-code entries have no static caller, so check them before you delete anything.

Input Schema

NameRequiredDescriptionDefault
pathNoOptional relative path to filter analysis (subdirectory or file)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description earns credit for adding caveats the annotations cannot: complexity is cyclomatic and therefore approximate, and dead-code entries merely lack a static caller, so they must be verified before deletion. 'Read-only' restates the annotation but the accuracy and deletion-safety warnings are real added value.

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?

Front-loaded with the purpose, then use cases, then the parameter, then the caveats; each sentence carries a distinct payload. The only slack is the redundant 'Read-only' clause already covered by annotations.

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?

An output schema exists, so return values need not be described, and the description covers scope, filtering, what analyses are produced and their accuracy limits. For a zero-required-parameter, read-only analysis tool this is everything an agent needs before calling it.

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% and the single `path` parameter is already documented as an optional relative path filtering a subdirectory or file. The description's 'Pass `path` (relative) to limit it to a directory or file' largely restates that, so the baseline 3 applies.

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?

States a specific verb and resource ('review the quality of the indexed project, or of one path') and enumerates the concrete outputs: complex/long functions, large classes, dead code, module dependencies, overall score. It does not name any sibling tool, so the agent has to infer the boundary with `graph` or `map` on its own, which keeps it just short of a 5.

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?

Gives concrete trigger phrases ('what is the most complex code', 'review this directory', 'is there dead code') and tells the caller to pass `path` to narrow to a directory or file. No exclusion or 'use X instead' guidance is given, so nothing prevents overlap confusion with `graph` or `search`, but the positive usage context is strong.

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

Deploy Server

Other Tools