Apply structured AST patch
carve_apply_ast_patchApply structured operations to a PART 12 Carve AST, validate them, and get the patched AST with canonical Carve source.
Instructions
Validate and apply structured operations to a PART 12 Carve AST, returning the patched AST and canonical Carve source.
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": {
"ast": "<ast>",
"operations": "<operations>"
},
"name": "carve_apply_ast_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ast | Yes | PART 12 base AST (maximum 1000000 JSON bytes) | |
| operations | Yes | Structured patch operations (maximum 1000 operations and 1000000 JSON bytes) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ast | Yes | ||
| source | Yes |