get_posts
Retrieve WordPress posts with optional search, filters, pagination, and sorting to list published content or find specific posts by author, category, tag, date, or status.
Instructions
Retrieve WordPress posts (published ones by default). Without search, filters or page options, it returns all posts; with them, one page and the total
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_posts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, from 1 (optional) | |
| tags | No | Only posts with any of these tag IDs (optional; get_tags lists them) | |
| after | No | Only items published after this date or date-time, ISO8601 in the site's time zone, e.g. '2026-11-01' (optional) | |
| order | No | Sort order (optional, default 'desc') | |
| author | No | Author user ID (optional) | |
| before | No | Only items published before this date or date-time (optional) | |
| search | No | Keyword to search for in the title and content (optional) | |
| status | No | Which posts to list (optional): 'publish' (default), 'future' (scheduled), 'draft', 'pending', 'private', or 'any'. Several can be given with commas, e.g. 'future,draft'. Other than 'publish', the credentials must be allowed to edit posts | |
| orderby | No | Sort field (optional, default 'date'). 'relevance' needs search | |
| per_page | No | Items per page, 1-100 (optional). With any of search, filters or page options, only one page is read (default 20 per page), and the result shows the total | |
| categories | No | Only posts in any of these category IDs (optional; get_categories lists them) |