Skip to main content
Glama

delete_symbol

Remove TypeScript/JavaScript symbols and their references from code files to clean up unused code and maintain project structure.

Instructions

Delete a TypeScript/JavaScript symbol (variable, function, class, etc.) and all its references

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootYesRoot directory for resolving relative paths
filePathYesFile path containing the symbol (relative to root)
lineYesLine number (1-based) or string to match in the line
symbolNameYesName of the symbol to delete
removeReferencesNoAlso delete all references to the symbol

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the destructive action ('Delete') and the scope of deletion ('all its references'), but lacks critical details such as whether the operation is reversible, what permissions are needed, how errors are handled, or what the output looks like. For a destructive tool with zero annotation coverage, this is insufficient.

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 a single, efficient sentence that front-loads the core action and resource without unnecessary words. Every part of the sentence contributes essential information about the tool's purpose and scope.

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

Completeness2/5

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

Given the complexity of a destructive operation with no annotations and no output schema, the description is incomplete. It fails to address critical aspects like error handling, confirmation prompts, side effects on dependent code, or return values, leaving significant gaps for an AI agent to understand the tool's full behavior.

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 documents all five parameters thoroughly. The description adds no additional meaning about parameters beyond implying that 'symbolName' refers to a TypeScript/JavaScript symbol and 'removeReferences' relates to deleting references. 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 ('Delete') and target resource ('TypeScript/JavaScript symbol'), including what types of symbols are affected ('variable, function, class, etc.') and the scope ('and all its references'). It distinguishes itself from sibling tools like 'rename_symbol' by specifying deletion rather than modification.

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?

The description provides no guidance on when to use this tool versus alternatives like 'rename_symbol' or 'find_references', nor does it mention prerequisites, constraints, or typical scenarios for deletion. It states what the tool does but not when it should be selected.

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