Skip to main content
Glama

delete_symbol

Remove entire functions or classes from source code files using AST-based editing to delete symbols and their decorators cleanly.

Instructions

Delete an entire function or class definition, including its decorators.

Use this when: You want to remove a function, method, or class entirely from a source file. Don't use this when: You want to remove a config key -> use delete_key. You want to remove an import -> use remove_import. You want to remove lines inside a function -> no dedicated tool yet; use replace_function_body to rewrite the body without the unwanted lines.

Example: target="LRUCache.old_method" # deletes a method target="DeprecatedClass" # deletes a whole class (and all its methods)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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 clearly indicates this is a destructive operation ('remove entirely'), but doesn't mention permissions needed, whether deletions are reversible, or what happens to dependent code. The examples help clarify scope but behavioral details are incomplete.

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?

Well-structured with clear sections: purpose statement, usage guidelines with bullet points, and concrete examples. Every sentence adds value with no wasted words. The information is front-loaded with the core purpose first.

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 destructive operation with no annotations, the description does well by providing usage guidelines, examples, and sibling tool distinctions. Since an output schema exists, it doesn't need to explain return values. The main gap is lack of behavioral warnings about irreversible changes.

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

Parameters4/5

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

With 0% schema description coverage, the description must compensate. It provides examples showing how 'target' parameter works (e.g., 'LRUCache.old_method', 'DeprecatedClass'), which adds valuable semantic context beyond the bare schema. However, it doesn't explain the 'file_path' parameter at all.

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 an entire function or class definition, including its decorators') and the resource ('function, method, or class'), distinguishing it from siblings like delete_key and remove_import. It provides concrete examples of what gets deleted (methods, whole classes).

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

Usage Guidelines5/5

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

Explicitly provides 'Use this when' and 'Don't use this when' sections with clear alternatives named (delete_key, remove_import, replace_function_body). This gives precise guidance on when to choose this tool versus other available options.

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/kambleakash0/agent-skills'

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