safe_delete
Delete a named declaration safely: refuses removal when references exist and lists them, preventing orphaned call sites. Preview by default; apply=true writes changes.
Instructions
Delete a named declaration — USE INSTEAD OF Edit-deleting it; REFUSES while still referenced (lists the refs, force=true overrides) so a delete can't silently orphan call sites. PREVIEW by default; apply=true writes.
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": {
"symbol": "<symbol>"
},
"name": "safe_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | 0-based line; disambiguate same-named (optional). | |
| path | No | File holding the symbol (else resolved via the index). | |
| apply | No | Write to disk (default false = preview). | |
| force | No | Delete even if referenced (default false = refuse). | |
| symbol | Yes | Declaration to delete. | |
| backend | No | ||
| maxResults | No | ||
| projectPath | No |