mcp-easy-ai__wp_search_posts
Searches published posts by keyword, in every public post type or the one named in subtype. Never returns drafts, pending, private or scheduled posts, or media, so an empty result does not mean the item is missing; for those use wp_list_posts / wp_list_pages with search and status: "any", or wp_list_media with search. Returns { results: [{ id, title, url (the permalink), type, subtype, snippet (only with snippet: true) }], total, total_pages, page, per_page, query }. To include terms, use wp_search. Through Royally: its server marks it read-only, so it runs straight away.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination. | |
| query | Yes | The search query string. | |
| site_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| snippet | No | When true, include a `snippet` field on each result: a plain-text excerpt (HTML, shortcodes, and block markup stripped) windowed around the first match of the query. Lets you judge relevance or read the matched context without a follow-up wp_get_post per result. Default false (response is unchanged when omitted). | |
| subtype | No | Post type subtype to search within (e.g. post, page). Maps to the WP REST API /wp/v2/search "subtype" parameter. Omitting this searches all searchable post types (WP defaults "subtype" to "any"). | |
| per_page | No | Number of results per page (1-100). | |
| snippet_length | No | Maximum snippet length in characters (20-1000, default 200). Only used when snippet is true. |