delete_symbol
Remove TypeScript/JavaScript symbols and their references from code files to clean up unused code and maintain project structure.
Instructions
Delete a TypeScript/JavaScript symbol (variable, function, class, etc.) and all its references
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": {
"root": "<root>",
"filePath": "<filePath>",
"line": "<line>",
"symbolName": "<symbolName>"
},
"name": "delete_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | Root directory for resolving relative paths | |
| filePath | Yes | File path containing the symbol (relative to root) | |
| line | Yes | Line number (1-based) or string to match in the line | |
| symbolName | Yes | Name of the symbol to delete | |
| removeReferences | No | Also delete all references to the symbol |