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
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 states the tool deletes symbols and references, implying a destructive mutation, but fails to mention critical behaviors like whether deletions are permanent, require specific permissions, have side effects on code structure, or provide confirmation. For a destructive tool with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence that front-loads the core action and scope. It avoids redundancy and wastes no words, though it could be slightly more structured by explicitly separating purpose from behavior.

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?

For a destructive mutation tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on error handling, return values, safety warnings, or dependencies, leaving critical gaps for an agent to use this tool effectively in a codebase context.

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 5 parameters thoroughly. The description adds no additional semantic context about parameters beyond implying 'symbol' includes variables, functions, classes, etc., which is minimal value. Baseline 3 is appropriate when the schema does the heavy lifting.

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'), distinguishing it from sibling tools like 'rename_symbol' or 'find_references'. It specifies the scope includes 'all its references', making the purpose unambiguous and distinct from alternatives.

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 or exclusions. It lacks context about appropriate scenarios, leaving the agent to infer usage from the tool name alone.

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/SomeiLam/news-mcp'

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