Skip to main content
Glama

replace document body

replace_studio_document_body
DestructiveIdempotent

Replace the complete current body. The saved text is authoritative immediately and its diff remains reviewable. Read the complete document before a whole-body rewrite. 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>",
      "body": "<body>",
      "workspace_id": "<workspace_id>",
      "request_key": "<request_key>"
    },
    "name": "replace_studio_document_body"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesComplete requested document body
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, so the safety profile is known. The description adds genuine context beyond that: the write is authoritative immediately, the prior text stays reviewable as a diff, and request_key scopes replay to an identical request.

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?

Four short sentences, each carrying distinct operational information, with the core action and its immediate-commit semantics front-loaded. The telegraphic style is dense 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 whole-body mutation with six parameters, the description covers the essentials: read-before-write, workspace provenance, idempotency key discipline, and the fact that the diff stays reviewable. An output schema exists, so return values need no explanation; only document_id/season_id scoping is left implicit.

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?

With schema coverage at 33%, the schema documents only body and expected_revision, so the description must compensate. It usefully explains where workspace_id comes from and the idempotency contract for request_key, but document_id and season_id remain undocumented in both places.

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?

"Replace the complete current body" names a specific verb and resource, and the phrase "whole-body rewrite" implicitly separates it from the incremental siblings apply_studio_document_edits and replace_studio_document_text. It never names those siblings directly, so an agent must infer the boundary rather than read it.

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 real preconditions: read the complete document first, take workspace_id from the authorized Film, Series or GenAds directory, and reuse request_key only for the same exact request. It stops short of explicit when-not-to-use routing against the partial-edit siblings, which is the main remaining 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