ast_delete_symbol
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
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language hint (e.g. "rust", "go"). Overrides extension-based detection. | |
| path | Yes | File containing the symbol. | |
| symbol | Yes | Symbol name to delete (qualified names like `Impl::method` accepted). | |
| agent_preset | No | When true, replace uses the agent preset: unique, require_change, fuzzy floor 0.90, allow_absent_old false. Off unless set. | |
| expected_sha256 | No | SHA-256 hex of the file's current bytes. If it does not match, the tool returns error_kind stale and writes nothing. |