replace_symbol
Replaces a function, method, or class definition with new source code, auto-fixing indentation and rejecting syntax-breaking edits; returns file and related test check results.
Instructions
Replace a whole function/method/class definition with new_source (include the signature line and any decorators/annotations; indentation is fixed for you). Refused if it would break syntax. Returns check results for the file and its related tests.
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": {
"name": "<name>",
"new_source": "<new_source>"
},
"name": "replace_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| new_source | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |