Skip to main content
Glama

Read a post or page

wp_get_post
Read-onlyIdempotent

Retrieve one post, page or entry of any post type by ID, including raw content, public custom fields and assigned taxonomy terms. Use it to read a single item for editing or analysis.

Instructions

Get one post, page or entry of any post type by id: the fields of wp_list_posts plus the raw content, public custom fields (meta) and the assigned term names per taxonomy. For a post built with a page builder or block library, built_with names the builder, how the page is stored and the tools that change it (write_via); where post_content is not what the site shows, its note says so, and wp_get_builder_layout returns the page's elements. A revision_id from wp_list_revisions returns that revision. Needs edit_posts and the right to read the post; a password-protected post or a revision needs the right to edit it (for a revision: its post). An unknown id returns a not-found error. Read-only.

Input Schema

NameRequiredDescriptionDefault
idYesPost id, as wp_list_posts or wp_search return it.
include_metaNotrue includes the public custom fields the account may edit (keys starting with "_" and credential-like keys are left out). Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past readOnlyHint/idempotentHint by disclosing capability requirements (edit_posts, right to read, extra rights for password-protected posts and revisions), the not-found error on unknown ids, and the built_with/note behavior when a page builder overrides post_content. That is exactly the behavioral context annotations can't express.

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?

Front-loaded with the core purpose and tightly packed; the builder/revision/permission sentences each carry unique information. The density is high but no sentence is redundant.

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?

With no output schema, the description compensates by enumerating returned fields (post fields, raw content, meta overview, term names, built_with/write_via) and covers permissions, revisions, and error behavior. An agent has everything needed to call it and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema: the id may be a post id from wp_list_posts/wp_search or a revision_id from wp_list_revisions, which is a non-obvious overloaded meaning.

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

Purpose5/5

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

States a specific verb and resource — fetch exactly one post/page/entry of any post type by id — and enumerates what is returned relative to a named sibling ("the fields of wp_list_posts plus..."). This cleanly separates it from wp_list_posts, wp_search, and the builder-layout tool.

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

Usage Guidelines4/5

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

Gives concrete routing rules: pass a revision_id to fetch a revision, and use wp_get_builder_layout when post_content is not the rendered page. It lacks an explicit "use wp_list_posts instead when you don't have an id" statement, so one minor exclusion is missing.

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

Deploy Server

Other Tools