Skip to main content
Glama

find_dead_code

Flag potential dead code by locating callables with no callers, tests, or subclasses; returns candidates, not verdicts.

Instructions

Callables with no callers, tests or subclasses. Candidates, not verdicts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one meaningful behavioral trait: results are heuristic candidates with possible false positives, not confirmed dead code. It discloses nothing else — no scope of analysis, no indexing prerequisite, no cost or result-size behavior beyond the implicit limit.

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?

Two terse sentences with no filler, and the identifying clause is front-loaded ahead of the caveat. Every word earns its place.

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

Completeness3/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-value detail is legitimately omitted, and the candidate caveat covers the main interpretive risk. What is missing is context for a graph-analysis tool: whether the repo must be indexed first and how far the caller/subclass analysis reaches, which matters given siblings like index_repository_tool and graph_status.

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

Parameters2/5

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

Schema description coverage is 0% and the single 'limit' parameter (default 50) is never mentioned in the description, so the agent gets no explanation of what it caps or whether it is a cap on returned candidates or on traversal. The parameter name is largely self-explanatory, which keeps this above a 1.

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 defines the exact target set — callables lacking callers, tests, or subclasses — which is specific enough that an agent can distinguish it from graph-query siblings like query_graph or get_impact_radius. It stops short of 5 because it is a noun phrase with no verb framing (e.g., 'find/list') and never explicitly contrasts itself with the other analysis tools.

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?

'Candidates, not verdicts' implies how results should be treated (verify before acting), which is useful implied guidance. However, there is no statement of when to reach for this tool versus query_graph, get_impact_radius, or search_nodes, and no prerequisite about the repository needing to be indexed.

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