Prepare an exact function-body replacement
ast_replace_symbol_bodyReplace a symbol's body while preserving its signature. Prepares a hash-bound plan for declarations, methods, accessors, and function-valued variables or properties, enabling safe review before application.
Instructions
Prepares a hash-bound body replacement while preserving the signature. Supports declarations, methods, accessors and function-valued variables/properties.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Compatibility field. Direct application is disabled; this tool always prepares. | |
| new_body | Yes | New body text without the enclosing braces. | |
| file_path | Yes | ||
| symbol_path | Yes | ||
| project_root | Yes | ||
| allow_new_errors | No | Permit a plan with new TypeScript errors after explicit review. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| status | Yes | ||
| blocked | Yes | ||
| preview | Yes | ||
| plan_hash | Yes | ||
| created_at | Yes | ||
| expires_at | Yes | ||
| diagnostics | Yes | ||
| block_reason | Yes | ||
| operation_id | Yes | ||
| project_root | Yes | ||
| affected_files | Yes | ||
| workspace_hash | Yes | ||
| reference_count | Yes | ||
| allow_new_errors | Yes | ||
| preview_truncated | Yes | ||
| workspace_file_count | Yes |