Skip to main content
Glama

find_dead_code

Find unused exports like components, hooks, and services in your codebase. Each result includes a reason why it appears unused, helping with systematic cleanup.

Instructions

Find dead code — exported components, hooks, services, and adapters that are never imported or used anywhere else in the codebase. Returns unused exports with reasons explaining why they appear unused. Useful for codebase cleanup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerNoOptional: limit dead code search to a specific architecture layer
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the tool returns 'reasons explaining why they appear unused', but does not disclose any behavioral traits such as performance impact, limitations (e.g., only scans static imports), or edge cases. This lack of detail reduces transparency.

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?

The description is two sentences long. The first sentence defines the tool's action and scope, the second explains output and use case. Every word serves a purpose, with no redundancy or filler. It is front-loaded and efficient.

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 tool with one optional parameter and no output schema, the description adequately covers what the tool does, what it returns (unused exports with reasons), and a typical use case (cleanup). It lacks detail on the exact output format, but the provided context is sufficient for most agents to decide invocation.

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 coverage is 100% as the single parameter 'layer' has a clear description in the input schema ('Optional: limit dead code search to a specific architecture layer'). The tool description adds no additional meaning beyond the schema, earning the baseline score of 3.

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 uses a specific verb 'find' and resource 'dead code', with clear scope ('exported components, hooks, services, and adapters'). It distinguishes from siblings like 'find_component_usages' by focusing on unused exports rather than usages of a specific component.

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 states 'Useful for codebase cleanup' but does not explicitly mention when to use this tool versus alternatives (e.g., 'find_component_usages'), nor does it specify when not to use it. The usage context is implied but not formalized.

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/calebsjames/atlas-ui-mcp'

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