wp_list_posts
Lists posts, pages, or custom post types with pagination and filtering. Returns stored slugs, which can be empty for drafts or pending posts. Publication applies WordPress core slug rules.
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_id": "<site_id>"
},
"name": "wp_list_posts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Optional Polylang language slug to filter posts. Requires active Polylang and a configured language. | |
| page | No | Page number for pagination. | |
| order | No | Sort direction. | DESC |
| search | No | Search query string to filter posts by keyword. | |
| status | No | Filter by post status. | publish |
| orderby | No | Field to sort results by. | date |
| site_id | Yes | The connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID. | |
| per_page | No | Number of results per page (max 100). | |
| post_type | No | Post type slug. Use "page" for pages, or any registered CPT slug. | post |