Skip to main content
Glama

create_field

Add one custom field to an existing checkout page, form, or event. Appended after the current fields unless order is given. Visibility rules must reference existing field and option IDs from the page detail response. Mutating; to add fields on a new page, pass fields to the create tool instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoUsed to store field data in a predictable manner. Please note that you must use Customer Name and Shipping Address if you wish to use any of the shipping address data types. Do not set `type` when `element` is one of: `checkbox`, `quantity`, `tax-id`, `po-number`, `multiple-choice`, `multi-select`, `date-time`, `date`, `time`, `textarea`.
labelYesForm label for the input element.
orderNoDisplay order of this field. When omitted, order is determined by the position of the field in the array.
hiddenNoWhether this field is hidden from customers at checkout.
layoutNoHow a multi-select field is drawn at checkout: `dropdown` (the default) or `list`, a list of checkboxes. Ignored on other elements.
pageIdYesThe ID of the page the field belongs to.
collectNoWhether to collect only a billing address or both billing and shipping. Applies to `address` elements. Defaults to `billing`.
elementNoInput control used to render this field in checkout. Defaults to `text`.
optionsNoSelectable options. Applies to `select`, `multi-select` and `multiple-choice` elements. Options on a `multi-select` need different values (an option without a value uses its label), and options on a `multiple-choice` need different labels.
maxValueNoMaximum allowed value settings for this field.
minValueNoMinimum allowed value settings for this field.
pageTypeYesThe kind of page the field belongs to: `checkout`, `form`, or `event`. Use the type of the tool you fetched the page with (get_checkout_page, get_form, get_event).
requiredNoWhether this field must be completed before checkout can continue.
referenceNoExternal reference ID for integration purposes. Generated from the field type or label when omitted.
descriptionNoOptional helper text shown below the field label.
placeholderNoSpecifies a short hint that describes the expected value of an input element
defaultValueNoDefault value settings for the field.
showHideLogicNoConditional visibility rules for this field. `element.elementId` must be the ID of an existing field on the same page, and `value` an option ID on that field (or `TRUE`/`FALSE` for a checkbox). Read the IDs from the page detail response; create-time keys are rejected here.
defaultCountryNoISO 3166-1 alpha-2 country code used as the default for `address` elements. Defaults to `US`.
collectShippingPhoneNoWhether to collect a phone number alongside the shipping address. Applies to `address` elements when `collect` is `billing_and_shipping`. Defaults to `false`.
showSelectedDialCodeNoWhether to display the selected international dial code in phone inputs.
limitAllowedCountriesNoCountry restriction settings for country-based fields.
limitBillingCountriesNoRestrict the billing country list. Applies to `address` elements.
limitShippingCountriesNoRestrict the shipping country list. Applies to `address` elements when `collect` is `billing_and_shipping`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so safety is covered; the description adds genuine behavior beyond that: fields are appended by default, order overrides placement, and visibility rules must reference existing field/option IDs from the page detail response. The word 'Mutating' is redundant with the annotations, keeping it from a 5.

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?

Four dense clauses, front-loaded with the action and scope, then ordering behavior, a prerequisite, and sibling routing. No filler and nothing repeated from the schema.

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?

With an output schema present, 100% schema coverage, and annotations covering the safety profile, the description only needs to add scope, ordering, prerequisites, and routing — all of which it does. Nothing an agent needs to call this correctly 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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning for the `order` parameter ('Appended after the current fields unless order is given') that the schema's array-position phrasing does not convey for a single-field call. It also surfaces the ID-reference constraint that governs showHideLogic values.

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?

States a specific verb and resource ('Add one custom field') and constrains scope to an existing checkout page, form, or event. That scope constraint cleanly separates it from create_checkout_page/create_form/create_event and from update_field/delete_field siblings.

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?

Explicitly routes one case to an alternative ('to add fields on a new page, pass fields to the create tool instead'), which is real when-to-use guidance. It does not, however, mention update_field or delete_field as alternatives for modifying/removing an existing field, so it falls short of full when/when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources