Skip to main content
Glama

Make a small edit to a report

edit_report
Destructive

Changes a few parts of a report without sending the whole document again, saved as a NEW newest version (earlier versions stay). Send the newest version number you read and the edits (the edits field lists each kind), applied in order, all or none: an edit that cannot apply saves nothing and the answer names it. If someone saved a newer version since, the answer is stale with its number: read it, check each edit still fits, and send the same edits again (never the whole document). The answer gives the new version's number and, when every edit can be undone, an undo list to send as edits against it. If a public link still shows an older version because the new one failed the share check, warning and linkLag say which link and which part held it: tell the person, take that part out, and save again. A value too large for one call (a design with a page per screen size) goes as ?as=text uploads to upload_report_file, named by the tool's _file field or by text_files; it is checked as if sent inline.

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": {
      "report_id": "<report_id>",
      "expected_version": "<expected_version>"
    },
    "name": "edit_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsNoThe edits, applied in order, all or none (or send edits_file). Each is one of: {op:"replace-text", old, new, id?} (old occurs exactly once, in block id or anywhere; new may be empty); {op:"replace", block} (same id); {op:"insert", block, after?|before?} (new id; neither = end); {op:"remove", id}; {op:"move", id, after?|before?}; {op:"change-canvas", id, changes:[{target, box?:{x,y,width,height}, text?, link?: board id|null}]} (moves, sizes, rewords or links parts of a design); {op:"replace-page", id, html} (an interactive page's whole new document; its files and settings stay); for a table or checklist row found by key (its first column, or by:"<column label>"): {op:"replace-cell", id, key, column, value}, {op:"replace-row", id, key, row}, {op:"insert-row", id, row, after?|before?} (new key), {op:"remove-row", id, key}. change-canvas, replace-page and the row edits can be undone.
report_idYesThe report (list_reports gives ids).
edits_fileNoIn place of edits: the sha256 of a ?as=text upload of the whole list as JSON; text_files then point into it ("/0/block/html" is the first edit's block HTML).
text_filesNoLarge texts sent as files instead of inline: each one PUT to upload_report_file's uploadUrl with ?as=text (its textCurl), then put at its pointer, such as "/0/block/html". Every text a block holds can go this way: a page's HTML, a supporting file's text, a long paragraph.
workspace_idNoWorkspace id from whoami; omit when there is one.
expected_versionYesThe report's newest version number when you read it: the edits apply to that version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / edits / description
      Previous value: -"The edits, applied in order, all or none (or send edits_file). Each is one of: {op:\"replace-text\", old, new, id?} (old occurs exactly once, in block id or anywhere; new may be empty); {op:\"replace\", block} (same id); {op:\"insert\", block, after?|before?} (new id; neither = end); {op:\"remove\", id}; {op:\"move\", id, after?|before?}; {op:\"change-canvas\", id, changes:[{target, box?:{x,y,width,height}, text?, link?: board id|null}]} (moves, sizes, rewords or links parts of a design); for a table or checklist row found by key (its first column, or by:\"<column label>\"): {op:\"replace-cell\", id, key, column, value}, {op:\"replace-row\", id, key, row}, {op:\"insert-row\", id, row, after?|before?} (new key), {op:\"remove-row\", id, key}. change-canvas and the row edits can be undone."New value: +"The edits, applied in order, all or none (or send edits_file). Each is one of: {op:\"replace-text\", old, new, id?} (old occurs exactly once, in block id or anywhere; new may be empty); {op:\"replace\", block} (same id); {op:\"insert\", block, after?|before?} (new id; neither = end); {op:\"remove\", id}; {op:\"move\", id, after?|before?}; {op:\"change-canvas\", id, changes:[{target, box?:{x,y,width,height}, text?, link?: board id|null}]} (moves, sizes, rewords or links parts of a design); {op:\"replace-page\", id, html} (an interactive page's whole new document; its files and settings stay); for a table or checklist row found by key (its first column, or by:\"<column label>\"): {op:\"replace-cell\", id, key, column, value}, {op:\"replace-row\", id, key, row}, {op:\"insert-row\", id, row, after?|before?} (new key), {op:\"remove-row\", id, key}. change-canvas, replace-page and the row edits can be undone."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes far beyond the annotations, disclosing atomic all-or-none application, that a failed edit saves nothing and is named in the response, that a stale version number yields a stale error, and that the response carries the new version number and a conditional undo list. This is exactly the mutation behavior an agent needs on top of destructiveHint=true.

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

Conciseness3/5

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

Purpose is front-loaded, but the rest is a single compressed run-on packing stale handling, share-check lag, and file-upload routing into one breath. Almost every clause carries operational information, yet the absence of structure and the tangled upload sentence make it harder to parse than it needs to be.

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

Completeness5/5

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

For a 6-parameter destructive mutation with no output schema, the description covers the return contract (new version number, undo list, stale number, warning/linkLag) and the full edit lifecycle including retry and partial-failure recovery. Nothing an agent needs to invoke it correctly is missing.

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 the baseline is 3, but the description adds real meaning: expected_version must be the number read, edits are applied in order and atomically, edits_file/text_files are the compressed path for large payloads, and workspace_id can be omitted when unique. The garbled phrasing around the ?as=text upload weakens it slightly.

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 and resource ('changes a few parts of a report') and immediately scopes it against the alternative of resending the document, plus that the result is a NEW newest version with earlier versions retained. An agent can tell this apart from a full-document create/write without opening the schema.

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?

Gives concrete when-to-use scenarios: send the version number you read, retry the same edits on a stale answer, strip the offending part when the share check lags, and route oversized values to upload_report_file with ?as=text. It lacks an explicit 'use create_report/write instead when replacing the whole document' statement, so the exclusion is implied rather than declared.

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