Skip to main content
Glama

Write custom fields

set_content_meta

Write custom fields on any WordPress content item, including meta keys REST ignores. Stores as standard post meta with companion plugin.

Instructions

Write custom fields (post meta) on a content item, including keys not registered with show_in_rest — which core REST refuses to write. Needs the companion plugin. Values are stored as standard post meta, so they survive if this tooling is removed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesContent ID.
metaYesKey/value pairs to write. A null value deletes the key.
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.
Behavior4/5

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

Annotations already mark this as a write operation (readOnlyHint=false) and non-idempotent. The description adds valuable extras: it requires a companion plugin and explains that values persist as standard post meta even if the tooling is removed. This goes beyond the structured hints without contradicting them.

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?

Two concise sentences with no filler. The core purpose and the unique differentiator (unregistered keys) are front-loaded, and the plugin requirement and storage persistence are stated efficiently. Every sentence earns its place.

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 write tool with no output schema, the description covers the plugin dependency and data persistence, complementing the annotations. It does not detail edge cases like error handling or the exact merge behavior for existing meta, but given the rich schema and annotations, these are minor omissions.

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 all parameters (id, meta, site_id) are already documented clearly, including the null-deletes-key behavior for meta. The description does not add further parameter-level meaning, matching the baseline expected when the schema carries the load.

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 clearly states the verb (Write), the resource (custom fields/post meta on a content item), and a distinguishing detail: it handles keys not registered with show_in_rest, which core REST refuses to write. This differentiates it from sibling write tools like update_content and from the read-oriented get_content_meta.

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 implies appropriate usage by highlighting a core REST limitation and the need for a companion plugin. It tells an agent when this tool is necessary (writing unregistered meta) but stops short of explicitly naming alternatives or stating when not to use it. The context is clear but not fully prescriptive.

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