Skip to main content
Glama

database_search_replace

Search and replace in WordPress database (e.g. URL migration).

Handles serialized data safely. Use dry_run=true first to preview changes.

Requires: API key with write scope.

Args: slug: Site identifier old: String to search for (e.g. "http://old-domain.com") new: Replacement string (e.g. "https://new-domain.com") dry_run: Preview only without making changes (default: true)

Returns: {"replacements": 42, "tables_affected": 5, "dry_run": true}

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": {
      "slug": "<slug>",
      "old": "<old>",
      "new": "<new>"
    },
    "name": "database_search_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
newYes
oldYes
slugYes
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that serialized data is handled safely, requires write-scope API key, and returns a structured summary. It does not describe any destructive side effects beyond the dry_run caution, but the safety note and return format add significant behavioral context.

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?

The description is well-structured: purpose, safety note, requirements, parameter list, and return value. Every sentence contributes useful information without redundancy, achieving clarity in a compact format.

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

Completeness5/5

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

For a mutation tool with no annotations and no output schema, the description provides all essential context: purpose, usage guidance, parameter semantics, and expected return format. It is complete enough for an agent to select and invoke the tool correctly.

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

Parameters5/5

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

The description includes an Args section that explains each parameter with examples (e.g., old and new URLs), adding meaning beyond the bare schema. Since schema coverage is 0%, this fully compensates and enriches parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Search and replace in WordPress database' with a concrete use case (URL migration). This distinguishes it from sibling tools like execute_query or optimize_database by specifying the exact operation and resource.

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?

Provides explicit instruction to use dry_run=true first and a real-world example (URL migration). It does not mention when not to use this tool or alternatives, but the given context is clear and actionable.

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.