delete_symbol
Remove a TypeScript/JavaScript symbol (variable, function, class) and optionally all its references across files for cleaner, refactored code.
Instructions
Delete a TypeScript/JavaScript symbol (variable, function, class, etc.) and all its references
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filePath | Yes | File path containing the symbol (relative to root) | |
line | Yes | Line number (1-based) or string to match in the line | |
removeReferences | No | Also delete all references to the symbol | |
root | Yes | Root directory for resolving relative paths | |
symbolName | Yes | Name of the symbol to delete |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"filePath": {
"description": "File path containing the symbol (relative to root)",
"type": "string"
},
"line": {
"description": "Line number (1-based) or string to match in the line",
"type": [
"number",
"string"
]
},
"removeReferences": {
"default": true,
"description": "Also delete all references to the symbol",
"type": "boolean"
},
"root": {
"description": "Root directory for resolving relative paths",
"type": "string"
},
"symbolName": {
"description": "Name of the symbol to delete",
"type": "string"
}
},
"required": [
"root",
"filePath",
"line",
"symbolName"
],
"type": "object"
}