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.

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>",
      "context": "<context>"
    },
    "name": "apply_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.
contextYesA few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as "a customer". Do not quote the user or include names, emails, or other personal details.
projectYesProject id or exact name
llm_modelNoThe model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics.
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details.",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The model identifier you are running as, for example \"claude-opus-4-8\" or \"gpt-5.2\". Pass \"unknown\" if you are not certain. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "project"
      -]New value: +[
      +  "project",
      +  "context"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description earns credit on top by disclosing the atomic batch semantics, the all-or-nothing exact-match rule, and the rev-based merge behavior for concurrently saved edits. It never states what a successful call returns, though with no output schema that is a real omission.

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, front-loaded with the action and mode split, no filler. The telegraphic compression ("with its header `rev`") makes a couple of clauses require a second read, but nothing is wasted.

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, 8-parameter mutation tool this covers the risky parts well: exactness requirements, atomicity, conflict resolution between file and saved edits, and the no-op failure mode. The main gap is the absence of any statement about the success response, which matters because there is no output schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter in detail; the baseline of 3 applies. The description does add cross-parameter meaning the schema does not spell out directly, namely that `rev` comes from the print_timeline header and that edits saved since that rev merge item by item, which nudges it above bare restatement.

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

Purpose5/5

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

States a specific verb+resource ("Changes the timeline") and immediately splits the operation into its two distinct modes: exact `edits` replacements versus a whole-file `source` rewrite. An agent can tell this apart from the read-only `print_timeline` sibling just from the wording.

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?

Explicitly routes the agent: use `edits` for targeted replacements copied from print_timeline, use `source` when "rewriting most of the timeline." It also gives the recovery path (mismatch changes nothing, print_timeline shows current text). It does not mention when to prefer sibling repair tools like undo_timeline or verify_timeline, leaving a small gap.

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