Skip to main content
Glama

Read custom fields

get_content_meta
Read-only

Retrieve custom field values for a WordPress content item, including hidden meta keys not exposed by the REST API. Specify keys by name to prevent truncation of long values.

Instructions

Read the custom fields (post meta) on a content item, including keys that are not registered with show_in_rest and therefore invisible to get_content. Needs the companion plugin to see unregistered keys. Values over 20,000 characters are truncated unless the key is requested by name in keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesContent ID.
keysNoOnly these meta keys. Omit for everything.
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_protectedNoInclude underscore-prefixed internal keys, which plugins use for their own state.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 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: +-9007199254740991
  2. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint and destructiveHint annotations, the description discloses important behaviors: unregistered keys require a companion plugin, and values over 20,000 characters are truncated unless requested by name in `keys`. These are non-obvious runtime details that meaningfully affect how the agent invokes the tool.

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?

Three tight sentences deliver the purpose, differentiation, prerequisite, and a key behavioral caveat. There is no filler, and the most important information is front-loaded.

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 a read-only tool with fully documented parameters, the description covers purpose, differentiation, prerequisites, and constraints. No critical information needed for correct invocation is missing.

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?

The schema already provides 100% coverage for all parameters, so the description does not need to repeat them. It adds value by explaining the truncation exception tied to the `keys` parameter, which deepens the agent's understanding of how that parameter affects behavior.

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 uses a specific verb ('Read') and resource ('custom fields (post meta) on a content item'), and clearly distinguishes itself from get_content by noting it can see keys invisible to that tool. This lets an agent identify the tool's unique purpose at a glance.

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 explains when this tool is needed versus get_content ('keys that are not registered with show_in_rest and therefore invisible to get_content'), and warns about the companion plugin prerequisite. This gives an agent actionable selection criteria without ambiguity.

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