Apply a timeline edit
apply_timelineChanges the timeline. edits are exact { oldText, newText } replacements copied from print_timeline, with its header rev; text outside them stays as it is, and edits saved since that rev merge in item by item. An edit that does not match exactly once changes nothing, and print_timeline shows the current text. source, the whole file, is for rewriting most of the timeline.
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": {
"project": "<project>"
},
"name": "apply_timeline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rev | No | With edits: the `cardboard:rev` from the header they were copied from, so edits saved since then merge in. Omit to edit the current timeline. | |
| edits | No | Exact, non-overlapping replacements against the timeline you read, applied as one batch. To insert, replace a unique anchor with the anchor and the new JSX. | |
| prefer | No | Who wins when this call and an edit saved since the timeline was printed both changed an item: file, this call (default), or editor, the saved edit. | |
| source | No | Full timeline.tsx text, only to rewrite most of the timeline. | |
| project | Yes | Project id or exact name |