Skip to main content
Glama

dead_code

Detects exported symbols never referenced by other files, revealing cleanup targets such as unused exports, orphaned functions, and dead interfaces. Respects Python all for precise export tracking.

Instructions

Find exported symbols never referenced by other files. Potential cleanup targets — unused exports, orphaned functions, dead interfaces. Respects Python all for precise export tracking.

max_tokens: cap output size (default 8000) to prevent context overflow
exclude_dirs: comma-separated directory prefixes to skip
output_format: "text" (default) or "json" for structured response
include_low: include low-confidence (likely false positive) symbols (default False,
    saves ~47% tokens — ~1,300 tokens on a typical repo)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathNo/demo
max_tokensNo
exclude_dirsNo
output_formatNotext
include_lowNo

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 the burden. It discloses token-saving behavior for include_low and clarifies parameter effects. However, it does not state that the tool is read-only or describe potential side effects (though likely none). The explanation of low-confidence symbols adds transparency.

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 a clear lead sentence and bullet-point parameter explanations. It is concise but includes necessary detail. Minor redundancy in the parameter list could be tightened.

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?

Given the output schema exists, return values need not be documented. The description covers all parameters and provides usage details. It lacks mention of edge cases (e.g., empty repo, no dead code found) but is largely complete for a code analysis tool.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully compensates by explaining each parameter's purpose, default, format, and effect (e.g., max_tokens for context overflow, exclude_dirs for directory prefixes, output_format choices, include_low token savings). This adds significant value beyond the schema.

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 the tool's function: 'Find exported symbols never referenced by other files.' It elaborates on cleanup targets (unused exports, orphaned functions, dead interfaces) and mentions Python __all__ support, making the purpose unambiguous and distinct from siblings.

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?

No explicit guidance on when to use this tool versus alternatives like dependencies or blast_radius. The description focuses on parameter usage but does not provide context-specific recommendations or exclusions.

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/Elmoaid/TempoGraph'

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