Skip to main content
Glama
patchloom

Patchloom

Official

ast_delete_symbol

Destructive

Delete a whole code symbol, including leading doc comments and attributes, and collapse surrounding blank lines in one Patchloom edit.

Instructions

Delete a whole symbol span, including leading doc comments and attributes, and collapse surrounding blank lines to one. Deletes the full symbol span (docs and attributes included) and collapses surrounding blank lines. Example: {"symbol":"unused_helper","path":"src/lib.rs"}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage hint (e.g. "rust", "go"). Overrides extension-based detection.
pathYesFile containing the symbol.
symbolYesSymbol name to delete (qualified names like `Impl::method` accepted).
agent_presetNoWhen true, replace uses the agent preset: unique, require_change, fuzzy floor 0.90, allow_absent_old false. Off unless set.
expected_sha256NoSHA-256 hex of the file's current bytes. If it does not match, the tool returns error_kind stale and writes nothing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.32.6

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, so the safety profile is covered; the description adds genuinely new context by specifying that the deletion swallows leading doc comments and attributes and that blank lines collapse to one. It still omits irreversibility/undo availability and what happens when the symbol is absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first and second sentences say the same thing almost verbatim ('Delete... including leading doc comments and attributes, and collapse surrounding blank lines' / 'Deletes the full symbol span (docs and attributes included) and collapses surrounding blank lines'), wasting a full sentence. The example is useful and the core action is front-loaded, but a quarter of the text is redundant.

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, no-output-schema mutation whose annotations already flag destructiveness, the description covers the action, the destruction footprint, and a usage example. Gaps are minor: absence/error behavior and whether the deletion is reversible are left unstated.

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 lang, expected_sha256, and agent_preset are already documented; the description only reinforces path and symbol via an example. That is the baseline 3 when the schema carries the load, with the example adding marginal value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (delete) and precise resource (a whole symbol span), with scope qualifiers — leading doc comments, attributes, and surrounding blank-line collapsing — that functionally separate it from ast_rename and ast_replace_symbol. It never names a sibling explicitly, so it falls short of full differentiation.

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?

No guidance on when to choose this over ast_replace_symbol, ast_rename, or delete_file, and no prerequisites stated. The example shows a bare invocation but not the conditions under which deletion is appropriate, and nothing mentions the stale/expected_sha256 workflow.

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