Skip to main content
Glama

remove_dead_code

Safely remove unused code symbols by verifying they have no dependencies before deletion, while checking for orphaned imports across files.

Instructions

Safely remove a dead symbol from its file. Verifies the symbol is actually dead (multi-signal detection or zero incoming edges) before removal. Warns about orphaned imports in other files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbol_idYesSymbol ID to remove (from get_dead_code results)
dry_runNoPreview changes without applying (default: false)
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it 'safely' removes, verifies the symbol is dead before removal, and warns about orphaned imports. This covers safety checks and side effects, though it lacks details on error handling, permissions, or rate limits, which are common gaps without annotations.

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 front-loaded with the core action and efficiently uses two sentences to cover verification and warnings. Every sentence adds critical information without waste, making it appropriately sized and well-structured for quick understanding.

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 no annotations and no output schema, the description does a good job covering the tool's behavior, safety, and side effects. However, it lacks information on return values or error responses, which would be helpful for a mutation tool. It compensates well but isn't fully complete without output details.

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 the schema already fully documents both parameters (symbol_id and dry_run). The description adds minimal value beyond the schema by implying symbol_id comes from 'get_dead_code results', but does not provide additional syntax, format, or usage details for the parameters. This meets the baseline for high schema coverage.

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 specific action ('remove a dead symbol from its file') and distinguishes it from siblings by specifying it operates on dead code identified by 'get_dead_code results'. It explicitly mentions the verification process ('multi-signal detection or zero incoming edges') and additional effects ('warns about orphaned imports'), making the purpose highly specific and differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by referencing 'get_dead_code results' as the source for symbol_id, suggesting this tool should be used after dead code detection. However, it does not explicitly state when not to use this tool or name specific alternatives among the many siblings, such as 'apply_codemod' or 'plan_refactoring', which could be related operations.

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/nikolai-vysotskyi/trace-mcp'

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