Skip to main content
Glama

find_dead_code

Read-onlyIdempotent

Audit project code for unreferenced functions and classes with zero callers, excluding entry points, tests, and route handlers, to locate dead code.

Instructions

Project-wide audit of unreferenced functions/classes (zero callers, excludes entry points, tests, route handlers).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoProject name/path (default: active).
max_resultsNoMaximum number of dead symbols to report (default: 20). Header always shows true total; raise for full audit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, so the bar is lower. The description adds meaningful analytical context beyond annotations: what counts as dead (zero callers) and what is deliberately excluded (entry points, tests, route handlers). It doesn't mention cost or runtime, but this is useful transparency for a static analysis.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the core definition first and the exclusion scope in a tight parenthetical. Every clause earns its place; no waste.

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

Completeness4/5

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

For a read-only, two-parameter analysis tool with full schema coverage and no output schema, the description plus annotations give an agent enough to invoke it correctly. Only the absence of when-to-use routing against sibling analysis tools keeps it short of complete.

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 both parameters (project default, max_results with 'header shows true total' note) are fully documented in the schema. The description adds no parameter detail beyond what the schema already provides, so baseline 3 applies.

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?

Names a specific analysis (audit of unreferenced functions/classes) with the defining criterion (zero callers) and explicit scope exclusions. An agent can distinguish this from siblings like find_semantic_duplicates or find_import_cycles without opening the schema.

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 when it applies via 'project-wide audit' and the exclusions, but never states when to prefer this over related analysis tools (find_semantic_duplicates, find_import_cycles, get_entry_points) or any prerequisites. Usage is inferable but not guided.

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