wp_search_posts
Search WordPress content across posts, pages, custom post types, and terms via the WP /wp/v2/search endpoint. Filter by type (post or term) to retrieve lightweight results with ID, title, URL, and subtype.
Instructions
Full-text search across posts, pages, custom post types, and terms via the WP /wp/v2/search endpoint. Returns a lightweight result shape (id, title, url, type, subtype). Filter by type=post (default search target) or type=term (taxonomies). For richer content fetch the hit by id via wp_posts_get / wp_pages_get.
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": {
"query": "<query>"
},
"name": "wp_search_posts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| type | No | ||
| query | Yes | ||
| subtype | No | ||
| per_page | No |