Skip to main content
Glama

Get content by ID

get_content
Read-only

Retrieve any WordPress content item by ID, returning the raw body exactly as stored — read this before making targeted edits.

Instructions

Fetch one item of any content type by ID, including the raw content body exactly as stored — which is what you must read before making targeted edits, since the block editor stores markup with HTML comment delimiters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe content ID.
rawNoReturn the raw stored content rather than the rendered output. Keep true for editing; set false to see what visitors get.
typeNoContent type slug. Wrong type gives a 404 — use find_content_by_url or get_content_by_slug if unsure.post
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
include_metaNoInclude registered custom fields.
max_content_charsNoTruncate very long bodies at this many characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / id / minimum
      Added value: +1
    • addedInput schema / properties / max_content_chars / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / max_content_chars / minimum
      Added value: +100
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false; the description adds valuable context by revealing that the block editor stores markup with HTML comment delimiters and explaining that 'raw' mode returns the exact stored body needed for safe edits. It also surfaces the 404-on-wrong-type behavior in the parameter docs. Minor deduction: no explicit note about the output shape, since there is no output schema.

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?

The main description is a single, information-dense sentence that front-loads the core action and the editing workflow. It earns its place. Minor deduction: the description leans on schema-side parameter prose for a lot of the routing/behavioral content, so the top-level description alone would be thinner without the schema — but the overall structure is tight.

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

Completeness4/5

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

For a read-only retrieval tool with no output schema, it covers the critical operational facts: raw vs. rendered content, editing use case, wrong-type 404 routing, site_id fallback logic, and truncation behavior. It is complete enough to use safely in the edit workflow, though an explicit note about what the returned content object looks like would make it fully self-contained.

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 the parameters are already well documented. The description adds framing on top of the schema by tying the 'raw' parameter to the editing workflow, and the schema itself provides rich practical guidance (e.g., default site behavior with list_sites, wrong-type 404, truncation minimum). The main description doesn't repeat parameter details, but the schema carries that burden and does it well.

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?

The description states a specific action ('Fetch one item of any content type by ID') and includes the key differentiator: it returns the raw content body exactly as stored. This distinguishes it from siblings like get_content_summary, get_content_by_slug, and get_content_terms, and makes the tool's purpose immediately clear.

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

Usage Guidelines5/5

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

The description explicitly tells the agent when this tool must be used ('which is what you must read before making targeted edits') and the schema adds concrete routing: 'Wrong type gives a 404 — use find_content_by_url or get_content_by_slug if unsure.' This goes beyond stating what the tool does to actively direct the agent toward correct vs. alternative usage.

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