Skip to main content
Glama

Get content by ID

get_content
Read-only

Fetch any content type by ID to retrieve the exact raw stored body, allowing you to inspect block editor markup 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.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds valuable behavioral detail: it returns the raw stored body exactly as stored, and explains why (block editor stores markup with HTML comment delimiters). This goes beyond the annotations and helps the agent understand output semantics without contradiction.

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

Conciseness5/5

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

The description is a single sentence that front-loads the core action and then provides the essential rationale. Every clause earns its place; there is no filler or redundancy. It is concise while still adding meaningful context.

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 fetch tool with a fully documented schema and strong annotations, the description is nearly complete. It covers the primary purpose, the editing context, and the raw-body nuance. It does not describe error conditions or return structure, but the schema and annotations compensate; no critical information for correct invocation is missing.

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 coverage is 100%, so every parameter is already documented with clear meanings. The description adds marginal value by tying the raw body mention to the 'raw' parameter and reinforcing the editing use case, but it does not introduce new parameter semantics beyond what the schema provides. Baseline 3 is appropriate.

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 the exact action: fetch one item of any content type by ID, and highlights the raw content body. It clearly distinguishes from siblings like list_content (fetching multiple), get_content_by_slug (by slug), and find_content_by_url (by URL) by explicitly anchoring to ID-based retrieval.

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?

The description gives a concrete usage context: 'what you must read before making targeted edits.' It implies this is the correct tool for content edits and that raw output is needed. However, it does not explicitly name alternatives or state when NOT to use it; the schema partially covers this by referencing find_content_by_url and get_content_by_slug, but the description itself lacks explicit exclusion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alokemajumder/wpxmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server