Skip to main content
Glama

Write custom fields

set_content_meta

Write custom post meta on any content item, including keys hidden from REST API, with companion plugin for standard WordPress storage.

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 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
    • addedInput schema / properties / meta / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description adds useful behavioral context: values persist as standard post meta even if this tooling is removed, and the tool requires a companion plugin. This does not contradict the readOnlyHint=false or destructiveHint=false annotations, and the plugin dependency is material to whether the call will succeed.

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 two tight sentences. The first sentence front-loads the purpose and key differentiator; the second covers the dependency and persistence guarantee. No filler or redundancy.

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?

The description covers purpose, the unique capability with unregistered keys, the plugin prerequisite, and persistence behavior. It does not mention overwrite semantics or return value, but with full schema coverage and annotations present, it is nearly complete for a write operation.

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?

The schema already covers all three parameters with descriptions, so the baseline is 3. The tool description does not add parameter-level detail beyond the schema; the null-deletes-key behavior is already in the schema. It does add useful conceptual context about unregistered keys, but not new semantics for id, meta, or site_id.

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 and resource: 'Write custom fields (post meta) on a content item.' It immediately distinguishes itself from core REST by noting it can write keys not registered with show_in_rest, which clearly separates it from update_content, get_content_meta, and set_seo_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 states a clear prerequisite ('Needs the companion plugin') and identifies a key use case: writing keys that core REST refuses to write. It does not explicitly name alternative tools or say when not to use it, but the context is enough for an agent to select it for custom-field writes.

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