Skip to main content
Glama

apply document edits

apply_studio_document_edits
DestructiveIdempotent

Apply exact, unique, non-overlapping search and replacement passages immediately. Read the current document first. Unread changes never block another edit. Use workspace_id from the authorized Film, Series or GenAds directory. Reuse request_key only for the same exact request.

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": {
      "document_id": "<document_id>",
      "expected_revision": "<expected_revision>",
      "edits": "<edits>",
      "workspace_id": "<workspace_id>",
      "request_key": "<request_key>"
    },
    "name": "apply_studio_document_edits"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYes
season_idNo
document_idYes
request_keyYes
workspace_idYes
expected_revisionYesCopy the exact revision returned for this same resource. Never invent a hash or reuse another resource's revision. Obtain current passage evidence before editing.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description adds real value on top: edits must be exact, unique and non-overlapping, and request_key may only be reused for the identical request, which clarifies the idempotency contract. It does not say whether multiple edits apply atomically or what failure looks like when a search passage is non-unique.

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?

The operative instruction is front-loaded in the first sentence and each subsequent sentence carries a distinct constraint with no filler. A couple of phrases ('Unread changes never block another edit') are terse enough to need a second read, but nothing is redundant.

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 six-parameter mutation the description covers the preconditions, the matching constraints, workspace scoping, and retry semantics, and an output schema exists so return values need no explanation. The remaining gap is failure behavior — partial application, stale revision handling, non-unique match errors — which matters for a tool flagged destructive.

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 only 17%, so the description must carry more weight than it does. It usefully constrains workspace_id sourcing and request_key reuse, and implies document_id/expected_revision are preconditions via 'Read the current document first', but season_id, the rationale requirement, the 100-edit cap, and preserve_text receive no explanation anywhere.

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 and resource plus the mechanism: 'Apply exact, unique, non-overlapping search and replacement passages' to a document. An agent can tell this is a passage-level find-and-replace edit, but the description never names the close siblings (native.find_and_replace_in_document, replace_studio_document_text, replace_studio_document_body), so the boundary is inferred rather than stated.

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?

'Read the current document first' gives an explicit prerequisite, and 'Unread changes never block another edit' resolves a real workflow question about whether pending changes gate a new edit. It also directs where workspace_id must come from. It stops short of naming alternatives or a when-not-to-use condition.

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