Skip to main content
Glama

analyze_codebase_health

Analyze codebase health by detecting code clones, dead symbols, god files, architecture violations, and naming issues. Get a health score, grade, and actionable recommendations.

Instructions

Analyze the health of the ingested codebase.

Runs 5 analysis passes over all fragments in the current session:

  1. Clone Detection — SimHash pairwise scan for Type-1/2/3 code clones

  2. Dead Symbol Analysis — defined but never referenced symbols

  3. God File Detection — files with > μ+2σ reverse dependencies

  4. Architecture Violation Detection — cross-layer imports

  5. Naming Convention Analysis — Python/Rust/React convention breaks

Returns a JSON HealthReport with: - code_health_score [0–100] and health_grade (A/B/C/D/F) - Per-dimension scores: duplication, dead_code, coupling, arch, naming - clone_pairs, dead_symbols, god_files, arch_violations, naming_issues - summary (human-readable) and top_recommendation (most impactful action)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It details the 5 analysis passes and the output structure, providing good behavioral transparency. However, it doesn't explicitly state non-destructiveness or auth needs, though it's implied by being an analysis tool.

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 bullet points and front-loaded. Every sentence adds value, but it could be slightly shorter without losing information.

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?

Given 0 parameters and an output schema described in detail, the description is complete. It covers purpose, analysis logic, and return format, sufficient for an agent to use correctly.

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

Parameters4/5

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

No parameters exist, so description doesn't need to add param info. Baseline 4 is appropriate.

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 it analyzes codebase health with 5 specific analysis passes. It distinguishes from sibling tools like security_scan or coverage_gaps by being a comprehensive health assessment.

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 implies it's for analyzing codebase health after ingestion, but doesn't explicitly state when to use it versus alternatives or provide exclusion criteria. No guidance on prerequisites or post-conditions.

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/juyterman1000/entroly'

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