chronos_edit_symbol
Edit a symbol's body or insert code before/after it with AST-bounded changes, preserving formatting and blocking breaking signature edits unless forced.
Instructions
Perform surgical AST-bounded edits (replace_body, insert_before, insert_after) against a fresh disk parse with leading trivia deduplication, indentation/CRLF/BOM preservation, and a 2-stage Tree-sitter syntax + contract blast-radius gate (blocked_requires_force on breaking signature changes with callers unless force=true).
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>",
"file": "<file>",
"operation": "<operation>",
"new_code": "<new_code>"
},
"name": "chronos_edit_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Relative or absolute path within workspace to the target source file | |
| force | No | Override Stage 2 contract blast-radius block when changing a signature with callers (default: false) | |
| symbol | Yes | Target symbol name or 'Class/method' path to edit (resolved via fresh disk AST parse) | |
| dry_run | No | Validate syntax and contract impact without modifying disk (default: false) | |
| new_code | Yes | Replacement or inserted code block (indentation and CRLF/LF + BOM are auto-preserved) | |
| operation | Yes | Edit operation: replace_body | insert_before | insert_after | replace_body |
| max_answer_chars | No | Optional maximum character budget for the response (default: 24000; <= 0 disables truncation) |