Skip to main content
Glama

find and replace in document

native.find_and_replace_in_document
DestructiveIdempotent

Apply the creator's explicit literal text replacement. Search is an exact passage, never an intent selector or a regular expression.

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": {
      "work_id": "<work_id>",
      "arguments": "<arguments>",
      "expected_catalog_version": "<expected_catalog_version>",
      "read_skills": "<read_skills>",
      "request_key": "<request_key>"
    },
    "name": "native.find_and_replace_in_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
work_idYes
argumentsYes
read_skillsYesExact required native skills and their dependencies, copied from the accepted session bootstrap's skills array. Include only entries in that array. General mcp.* guides and native.{studio}.instructions are guidance, not native skill proofs.
request_keyYes
publication_proposal_idNoFor native Social scheduling, the exact server-approved publication proposal. This identifier cannot confer approval by itself.
expected_catalog_versionYesFor a new session, read a studios/{studio}/native/{pack} child toolset and copy invocation.catalog_version from a native tool descriptor. Do not use the top-level library version. For calls in an existing session, use that session proposal's catalog_version.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, so the agent knows this is a state-mutating, repeatable write. The description adds only the literal-matching constraint, not the consequences of the mutation: whether all matches are replaced or just the first, what happens when the passage is absent, or how stale revisions are rejected. With rich annotations the bar is lower, but these gaps are real for a destructive tool.

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?

Two short sentences with no filler, and the semantic constraint is front-loaded in sentence two. It is efficient, though terse enough that useful scope information was traded away for brevity.

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

Completeness2/5

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

This is a six-parameter, nested-object, destructive mutation with a 50% documented schema, and the description leaves out the essentials an agent needs: whether replacement is global or single-occurrence, how revision conflicts surface, and what the call returns. An output schema exists, so return values need not be explained, but the mutation semantics remain under-specified.

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 50%, and the description meaningfully sharpens the 'find' parameter by ruling out regex and intent matching. It says nothing about work_id, request_key, read_skills, or expected_catalog_version, and the schema already documents expected_revision and read_skills at length, so the added value is narrow rather than compensating for the coverage gap.

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?

The description states a specific action on a specific resource ('Apply the creator's explicit literal text replacement'), and the 'literal / exact passage' framing tells an agent this is a text-substitution operation rather than a semantic rewrite. It avoids naming the closest siblings (native.replace_document_body, native.apply_document_edits, native.replace_document_text), so differentiation relies on the title.

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 a clear negative rule ('never an intent selector or a regular expression'), which implicitly tells the agent not to use this tool for semantic or regex edits. However, it never states when to prefer this over whole-body replacement or batch document edits, and no prerequisites or ordering guidance (e.g., read the passage first) appear in the description itself.

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