Skip to main content
Glama

find_and_replace

Search and replace text in active Trados Studio target segments, previewing changes by default and requiring explicit confirmation before writing bulk edits.

Instructions

[DESTRUCTIVE/BULK] Search and replace in target text (dry_run=True default; requires confirm=True to write).

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": {
      "find": "<find>",
      "replace": "<replace>"
    },
    "name": "find_and_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
findYes
regexNo
statusNo
confirmNo
dry_runNo
replaceYes
strict_qaNo
set_statusNo
whole_wordNo
max_changesNo
case_sensitiveNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and it does disclose the most important trait: the operation is destructive and bulk, defaults to a non-writing dry run, and needs an explicit confirm flag to mutate data. It omits secondary behavior such as what happens when max_changes is exceeded or how regex mode interacts with matches.

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?

A single dense sentence that front-loads the destructive classification and the write-safety flow, with no filler. It is arguably too terse given the parameter surface, but nothing is wasted.

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?

For an 11-parameter destructive bulk tool, the description is not complete enough: it never says whether 'target text' means the active segment, all segments, or the whole document, which is essential before a bulk replace. An output schema exists, so return values need not be described, but the scope and limits of the edit are missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 11 parameters, so the description must compensate, yet it explains only two flags (dry_run, confirm). The remaining nine parameters, including regex, whole_word, case_sensitive, max_changes, strict_qa, status and set_status, get no meaning from the description at all.

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 (search and replace) and resource (target text), plus a [DESTRUCTIVE/BULK] tag that signals the operation class. No sibling is named as the alternative, so it is clear on its own but not differentiated from the rest of the catalog.

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?

The description gives a clear procedural rule: dry_run is the default and confirm=True is required to write. That is useful when-to-use-of-safety guidance, but there is no statement about when to prefer this over narrow alternatives such as set_segment_target, nor any scope restriction on which segments are affected.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.