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"}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"symbol": "<symbol>"
},
"name": "ast_delete_symbol"
}
}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. |