Skip to main content
Glama

get_posts

Read-only

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

NameRequiredDescriptionDefault
pageNoPage number, from 1 (optional)
tagsNoOnly posts with any of these tag IDs (optional; get_tags lists them)
afterNoOnly items published after this date or date-time, ISO8601 in the site's time zone, e.g. '2026-11-01' (optional)
orderNoSort order (optional, default 'desc')
authorNoAuthor user ID (optional)
beforeNoOnly items published before this date or date-time (optional)
searchNoKeyword to search for in the title and content (optional)
statusNoWhich 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
orderbyNoSort field (optional, default 'date'). 'relevance' needs search
per_pageNoItems 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
categoriesNoOnly posts in any of these category IDs (optional; get_categories lists them)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: default status is 'publish', and omitting search/filters/page options triggers a full-list read while supplying any of them collapses to a single page plus a total. It stops short of mentioning auth requirements for non-publish statuses or result ordering.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with no filler, and the default-scope fact is front-loaded ahead of the pagination nuance. The second sentence packs three conditions into one clause, which is dense but still parseable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter read-only listing tool with a fully documented schema and no output schema, the description covers what the schema cannot: the default status, and the crucial behavioral fork between an all-posts read and a paged read with a total. An agent has enough to call it correctly without guessing.

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%, so every one of the 11 parameters is documented in the schema itself, including enums, ranges, and cross-references like 'get_tags lists them'. The description adds a generalized note that search, filters, and page options change the return shape, but contributes no parameter-specific syntax or format detail. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource phrase, 'Retrieve WordPress posts', and parenthetically fixes the default scope to published posts. It is clearly a plural listing tool, distinguishable from the singular get_post by its plural noun and filter vocabulary, but it never names or rules out any sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when the unbounded listing mode applies versus the paginated mode, which is real conditional guidance. However, it gives no guidance on choosing between this tool and alternatives like get_post, get_pages, or get_all_content, and no prerequisites such as the credential requirement for non-publish statuses are surfaced here.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.