Skip to main content
Glama

WordPress: Wp db search

wordpress_specialist_wp_db_search
Read-only

Search WordPress posts and products by full-text query with optional post type and status filters, returning matching IDs, titles, snippets, and URLs.

Instructions

[UNIFIED] Full-text search across post / product content using WP_Query with s=$query. NEVER raw SQL (S-25). Returns {query, limit, count, hits: [{id, post_type, status, title, snippet, url, modified}]}. Sanitises query via sanitize_text_field server-side; client caps it at 200 chars. limit defaults to 20, max 100. Optional post_type (string or array) and status (string or array) filters. Non-readable posts (private / draft from other authors) are filtered out by WP_Query's own posts_clauses — same gate the WP search page uses. Requires Airano MCP Bridge v2.18.0+ and manage_options.

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": {
      "site": "<site>",
      "query": "<query>"
    },
    "name": "wordpress_specialist_wp_db_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYes
limitNo
queryYes
statusNo
post_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description goes well beyond that: it discloses the exact return shape, server-side sanitisation, client-side 200-char cap, limit defaults/max, and that non-readable posts (private, other authors' drafts) are silently filtered out. The only real gap is it doesn't state what happens when no posts match beyond the count field.

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?

Front-loaded with the core operation and the return contract, then constraints and parameter rules. Density is high but nearly every clause adds operational value; only the 'same gate the WP search page uses' aside and the internal S-25 reference are near-filler for an agent.

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 supplies the return envelope, prerequisites, filtering behaviour and parameter caps, which is enough to call it correctly. The unmentioned 'site' parameter is the one hole in an otherwise complete definition for a read-only search tool.

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 0%, so the description carries the burden and mostly does: query (sanitised, capped at 200 chars), limit (default 20, max 100), post_type and status (string or array) all get meaning. The required 'site' parameter is never mentioned, leaving one of five parameters entirely undocumented.

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?

States a specific verb and resource — full-text search across post/product content — and pins down the mechanism (WP_Query with s=$query). It is instantly distinguishable from the db-check/optimize/size/tables siblings, which are maintenance operations rather than content lookups.

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?

Gives a hard constraint ('NEVER raw SQL (S-25)') and prerequisites (Airano MCP Bridge v2.18.0+, manage_options), which shapes how to approach the task. However it never says when to prefer this tool over another lookup path or when the filters are needed; usage is implied from the scope statement rather than stated.

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

Deploy Server

Other Tools