Skip to main content
Glama

fields_create_definition

Creates WordPress field groups, post types, taxonomies, or options page definitions with defaults and key generation, returning the stored definition.

Instructions

Create a definition (field group, post type, taxonomy or options page). The body is the definition itself; omitted keys take the kind's defaults, and a missing key is generated (group_..., post_type_..., taxonomy_..., ui_options_page_...). Fails with 409 when the key exists, 400 when it does not validate. Returns the stored definition (201).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "kind": "<kind>",
      "definition": "<definition>"
    },
    "name": "fields_create_definition"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesDefinition kind: field groups, post types, taxonomies or options pages
siteYesSite id (see list_sites)
definitionYesDefinition object in the shape of fields_get_schema for this kind (ACF-compatible)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.4.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden, and it delivers real behavioral detail: omitted keys fall back to per-kind defaults, a missing key is auto-generated with a kind-specific prefix, duplicate keys yield 409, validation failures yield 400, and success returns the stored definition with 201. It stops short of disclosing authorization requirements or whether retries are safe.

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?

Four tight sentences, each carrying signal: what it creates, how the body and defaults behave, the two error codes, and the success return. The prefix list in parentheses is slightly compressed relative to the enum values it maps to, but nothing is wasted.

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 three-parameter mutation tool with a nested free-form object, no annotations and no output schema, the description covers input semantics, defaulting behavior, failure modes, and the success status code. Only access-control and output-shape expectations remain unstated, which is acceptable given the tool's scope.

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 description coverage is 100%, so baseline is 3, but the description adds meaningful semantics beyond the schema: it clarifies that the `definition` body IS the definition object, that omitted keys are defaulted rather than rejected, and that key generation follows the kind. The prefix shorthand (group_..., post_type_...) is terse and not explicitly mapped to the enum values, which is a minor gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb and resource, 'Create a definition', and enumerates the four kinds (field group, post type, taxonomy, options page), so the agent knows exactly what gets created. It lacks explicit differentiation from overlapping siblings such as acf_create_field_group or fields_sync_definition, which is the only thing keeping it from a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the reader can infer this is the tool for creating content-model definitions from scratch, and the note about defaults and generated keys hints at when that path is appropriate. There is no explicit statement of when to prefer this over fields_update_definition or a sibling creator, and no stated prerequisites.

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