Skip to main content
Glama

find and replace in document

replace_studio_document_text
DestructiveIdempotent

Apply the creator's explicit literal text replacement. Search is an exact passage, never an intent selector or a regular expression. 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>",
      "find": "<find>",
      "replace": "<replace>",
      "workspace_id": "<workspace_id>",
      "request_key": "<request_key>"
    },
    "name": "replace_studio_document_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
findYesLiteral source passage
replaceYesReplacement text
season_idNo
document_idYes
request_keyYes
workspace_idYes
case_sensitiveNo
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.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and idempotentHint=true; the description adds a useful idempotency nuance (request_key only for the exact same request) and scoping context. However, it never warns that this mutates document text destructively, doesn't say whether all occurrences or only the first are replaced, and doesn't mention behavior on an expected_revision mismatch beyond the schema note.

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

Conciseness5/5

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

Four short sentences, each carrying a distinct constraint, with the core semantics (literal replacement) front-loaded. No filler or repetition of the title.

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

Completeness3/5

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

With an output schema present, return values needn't be explained, and annotations carry the safety profile. Still, for a destructive 8-parameter editing tool, gaps remain around match cardinality, revision-conflict failure mode, and the role of season_id/document_id.

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 only 38% across 8 parameters, so the description must compensate. It clarifies the semantics of find (exact literal, never regex) and request_key (idempotency scoping) and the provenance of workspace_id, which meaningfully exceeds the terse schema strings — though document_id, season_id, and case_sensitive are left entirely to the schema.

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?

"Apply the creator's explicit literal text replacement" states a specific verb (replace) and constrainable resource (literal passage in a document), and the second sentence rules out regex/intent matching. It does not name sibling tools like apply_studio_document_edits or replace_studio_document_body, so an agent must infer differentiation from those names alone.

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

Usage Guidelines3/5

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

It gives real preconditions: search must be an exact literal passage, workspace_id must come from an authorized Film/Series/GenAds directory, and request_key is only reusable for the identical request. What is missing is routing guidance — it never says when to pick this over native.find_and_replace_in_document or replace_studio_document_body.

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