Skip to main content
Glama

Apply a timeline edit

apply_timeline
Destructive

Changes 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.

Input Schema

NameRequiredDescriptionDefault
revNoWith edits: the `cardboard:rev` from the header they were copied from, so edits saved since then merge in. Omit to edit the current timeline.
editsNoExact, 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.
preferNoWho 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.
sourceNoFull timeline.tsx text, only to rewrite most of the timeline.
projectYesProject id or exact name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say destructiveHint=true; the description adds what an agent actually needs: edits are applied as one batch, text outside the replacements is preserved, non-unique/no matches cause no change at all, edits saved since `rev` merge item by item, and `prefer` decides conflict winners. That is substantial behavioral disclosure beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences with the primary mode first and the fallback mode last; nearly every clause carries semantics. Some phrasing is compressed to the point of ambiguity, e.g. 'An edit that does not match exactly once changes nothing,' which reads awkwardly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation with no output schema, the description covers atomicity, failure behavior, merge semantics and the alternate full-file mode. It does not say what the call returns on success or point at undo_timeline as recovery, which would matter for an agent doing risky edits.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description still adds value by tying `edits` to text copied from print_timeline, tying `rev` to the printed header, and framing `source` as the bulk-rewrite escape hatch. Insertion-via-anchor lives in the schema rather than the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource and immediately distinguishes its two input modes: `edits` for exact replacements vs `source` for rewriting most of the timeline. It also implicitly separates itself from print_timeline (the read side) by naming it as the source of the text. A sharper contrast with undo_timeline/check_timeline would push this higher.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear workflow guidance: read with print_timeline, copy exact text, pass its `rev`, and use `source` only 'to rewrite most of the timeline.' The condition selecting each mode is explicit. No exclusion against undo_timeline or timeline_history as recovery routes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources