Skip to main content
Glama

fields_create_definition

Creates a WordPress definition for field groups, post types, taxonomies, or options pages. Returns 409 if the key already exists.

Instructions

Create a definition (field group, post type, taxonomy or options page). Fails with 409 when the key exists.

Input Schema

TableJSON 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

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose one concrete behavioral trait — a 409 error when the key already exists — which is useful and non-obvious. However, it omits permission/auth requirements, whether creation is reversible, and the side effects of creating a post type or taxonomy (e.g., rewrite rule registration).

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?

One sentence plus a short failure clause, with the core action front-loaded and zero filler. Every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating, nested-object tool with no annotations and no output schema, the description covers what is created and one error mode, but omits prerequisites (site id resolution via list_sites, schema lookup via fields_get_schema), auth requirements, and any return information. Adequate but with clear gaps.

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 the schema already documents all three parameters, including the kind enum and the 'definition' object's shape reference to fields_get_schema. The description adds no syntax, format, or constraint detail beyond restating the kinds, so the baseline 3 applies.

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?

States a specific verb ('Create') and resource ('definition'), and enumerates the four kinds (field group, post type, taxonomy, options page) that map to the 'kind' enum. The verb distinguishes it from siblings like fields_update_definition or fields_delete_definition, though those alternatives are never named explicitly.

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

Usage Guidelines2/5

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

No when-to-use guidance, no prerequisites, and no routing to alternatives. It states a failure condition (409 on existing key) but never tells the agent when to choose create over update/sync, or that fields_get_schema should be consulted first even though the schema references it.

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