Skip to main content
Glama

search_replace_preview

search_replace_preview
Read-onlyIdempotent

Preview serialization-safe database search-and-replace changes before applying them, showing which tables and values would update without modifying any data.

Instructions

DRY RUN of a serialization-safe search/replace across the database. Shows what would change, changes nothing.

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": {
      "search": "<search>",
      "replace": "<replace>"
    },
    "name": "search_replace_preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
searchYesText to find
tablesNoLimit to these tables
replaceYesReplacement text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description still earns credit by adding 'serialization-safe' — a real behavioral trait warning that PHP-serialized values are handled without corruption — and by reasserting 'changes nothing' for emphasis. It stops short of describing permissions or output shape.

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?

Two short sentences, zero waste, and the critical qualifier ('DRY RUN') is front-loaded so an agent skimming cannot mistake it for a mutating operation.

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?

With no output schema, the description carries the burden of return semantics and does so at a high level ('shows what would change'). It is adequate for a 3-parameter, fully documented tool, though it could specify whether the preview lists matching rows/fields or just counts.

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 100%, so 'search', 'replace' and 'tables' are already documented, and the baseline is 3. The description adds no parameter-level detail — notably it doesn't clarify whether 'search' is literal or pattern-based, nor that 'tables' narrows the 'across the database' scope it advertises.

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: a dry-run preview of search/replace across the database, plus the scope qualifier 'serialization-safe'. No sibling tool (db_query, option_get, etc.) competes for this operation, so the agent can route unambiguously even without explicit sibling differentiation.

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 'DRY RUN' framing implies this is the safe pre-flight check before an actual mutation, which is useful context. However, it never names the corresponding apply tool, states prerequisites, or gives an explicit when-to-use/when-not-to-use rule, leaving the agent to infer the workflow.

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