Skip to main content
Glama
nagavitalp

code-health-mcp

by nagavitalp

analyze_repository

Run a comprehensive batch analysis over an entire repository to produce code health metrics, identify maintainability risks, and guide refactoring decisions across selected file patterns.

Instructions

Perform batch analysis of an entire repository for code health metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePatternsNoOptional file patterns to include (e.g., ["*.ts", "*.js"])
repositoryPathYesPath to the repository root directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only restates the action and purpose; it does not disclose whether the analysis is read-only, what repository traversal or scanning behavior occurs, what output the agent can expect, or any side effects or performance implications.

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 a single sentence with no filler. It front-loads the core action and scope, making it easy to scan. It is concise rather than overly verbose, though it sacrifices some informative detail for brevity.

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?

With only two simple parameters and no output schema, the description still leaves important context missing: it does not describe what 'code health metrics' are, what the tool returns, or how results are structured. An agent could invoke the tool from the schema, but would be uncertain about expected output and interpretation.

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 description coverage is 100%: both repositoryPath and filePatterns are documented in the input schema. The description adds no parameter-level detail beyond that, but the schema already handles parameter semantics adequately, so the baseline score of 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?

The description states a specific action ('Perform batch analysis') and resource ('entire repository') with a clear scope: code health metrics. The 'entire repository' phrasing and 'batch' nature help distinguish it from analyze_file, though the exact meaning of 'code health metrics' remains somewhat generic and overlaps with siblings like get_complexity_trends and predict_refactor_risk.

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?

Usage context is implied through the description: repository-wide batch analysis versus single-file analysis. However, there is no explicit guidance on when to choose this tool over the sibling tools, no stated exclusions, and no conditions or alternatives are named.

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