Skip to main content
Glama

wp_search_posts

Search WordPress posts by keyword on a specified site and return paginated results. Use it to locate relevant posts; for advanced filters, use wp_list_posts.

Instructions

Search posts by keyword (shortcut; wp_list_posts has every filter)

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>",
      "search": "<search>"
    },
    "name": "wp_search_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number
siteYesSite id (see list_sites)
searchYesSearch term
per_pageNoResults per page (max 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.14.0
    • addedInput schema / properties / page
      Added value: +{
      +  "default": 1,
      +  "description": "Page number",
      +  "type": "integer"
      +}
    • changedInput schema / properties / per_page / description
      Previous value: -"Results per page"New value: +"Results per page (max 100)"
    • changedInput schema / properties / per_page / type
      Previous value: -"number"New value: +"integer"
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "search"
      -]New value: +[
      +  "site",
      +  "search"
      +]
  3. First observedv2.0.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden; 'search' reasonably implies a read-only operation, but it does not say which fields are matched (title vs content), whether drafts/private posts are included, or how results are ordered. For a low-risk read tool this is adequate but thin.

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?

A single front-loaded sentence plus a disambiguating parenthetical; every clause earns its place and nothing is buried.

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?

For a simple read-only search with two required parameters, fully documented schema, and no output schema, the definition covers enough to call it correctly; only the match scope and result ordering remain unstated.

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%, with page, site, search, and per_page all documented including defaults and the per_page max of 100, so the schema does the work. The description adds no extra meaning such as whether search supports phrases or operators.

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?

"Search posts by keyword" gives a specific verb and resource, and the parenthetical explicitly contrasts it with wp_list_posts ("has every filter"), so an agent can separate the two without opening either schema.

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?

Calling itself a "shortcut" and pointing to wp_list_posts for full filtering implies when to prefer each, but it never states the condition explicitly (e.g. 'use this for a simple term, use wp_list_posts when you need status/author/date filters').

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