Skip to main content
Glama

analyze_codebase

Scan a codebase to uncover its structure, coding patterns, and quality metrics, helping teams assess code health before planning or improvements.

Instructions

Analyze existing codebase structure, patterns, and quality metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to analyze (default: current directory).
exclude_patternsNoFile patterns to exclude (e.g., ['node_modules', 'dist'])
include_patternsNoFile patterns to include (e.g., ['*.ts', '*.js'])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/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 full behavioral disclosure burden. It doesn't indicate whether the analysis is read-only, what permissions are needed, how long it might take, or any side effects. It also doesn't describe the return format or output structure, which is important since there's no output schema.

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, efficient sentence that front-loads the core purpose. It is appropriately sized for a tool of this complexity, though it could be slightly more informative without being verbose.

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 (analysis of codebase), lack of annotations, and no output schema, the description is incomplete. It doesn't cover usage context, behavioral traits, or what the analysis returns. An agent would need to infer much to use it correctly among many siblings.

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%, so the schema fully documents the three parameters including defaults and examples. The description adds no parameter details beyond what's in the schema. Per the rules, when coverage is high (>80%), the baseline score is 3 even with no parameter information in the description.

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 clear verb ('Analyze') and resource ('codebase') with the scope of analysis (structure, patterns, quality metrics). It distinguishes itself from siblings like review_code or suggest_improvements by focusing on analysis rather than modification or review. However, it doesn't name any sibling alternatives explicitly, so it's a 4 rather than 5.

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?

The description provides no guidance on when to use this tool versus alternatives like review_code or suggest_improvements. It simply states what the tool does without context for selection. This is a significant gap given the many sibling tools available.

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