Skip to main content
Glama

Set CRM Custom Field Values

custom_field_values_set
Idempotent

Sets a store's CRM custom field values. Takes the app_id returned by apps_list, the store's shop_domain (e.g. "acme.myshopify.com"), and values: an object keyed by the definition handle returned by custom_fields_list.

Each value must fit its field's type: a number for number, true/false for boolean, one of the field's options for select, a YYYY-MM-DD string for date, an object or array for json. null clears a field, which deletes its stored value. Only the handles you send are touched; every other field on the store keeps its value. At most 20 handles per call.

An unknown handle, or a value that does not fit its field, fails the whole call and writes nothing. Returns the store's full set of values after the write.

Writes are accepted for a store the CRM has not mirrored from Shopify Partner events yet. Setting a value fires the custom_field.changed automation trigger, once per field whose stored value actually changed.

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": {
      "app_id": "<app_id>",
      "shop_domain": "<shop_domain>",
      "values": "<values>"
    },
    "name": "custom_field_values_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
app_idYesThe app uuid returned by `apps_list`.
valuesYesValues keyed by custom field handle, from `custom_fields_list`. A null value clears the field. At most 20 entries.
shop_domainYesThe store's myshopify domain, e.g. "acme.myshopify.com".
organization_idNoAn organisation uuid or slug. When supplied, `app_id` is resolved within that organisation and may be a slug instead of a uuid, mirroring the Meridian web app.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: atomic all-or-nothing failure on unknown handle or type mismatch, partial-update semantics (only sent handles touched), null clearing that deletes the stored value, the 20-handle cap, behavior for stores not yet mirrored from Shopify events, the returned full value set, and the `custom_field.changed` automation side effect fired once per actually-changed field. That is exactly the mutation context an agent needs.

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?

Front-loads the action and its inputs, then layers limits, type rules, failure behavior, and side effects in a logical order; every sentence carries operational information. Slightly dense with mid-sentence line breaks, but no filler.

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?

For a nested-object write tool with no output schema, the description covers return shape (full value set after write), failure mode, limits, and automation side effects. Nothing an agent needs to invoke it 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 beyond it: the required value representation per field type (number, boolean, select option, YYYY-MM-DD, json), the null-clears-and-deletes semantics, and the partial-update contract on `values`. It does not explain `organization_id` slug resolution beyond what the schema already says, which keeps it from a 5.

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 (sets a store's CRM custom field values) and names the two definition-lookup siblings that feed its inputs (`apps_list`, `custom_fields_list`). An agent can distinguish this write tool from the read-oriented `custom_fields_list` without inspecting schemas.

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?

Gives concrete prerequisites (app_id from `apps_list`, handles from `custom_fields_list`) and the 20-handle ceiling, which tells the agent when to split work. It does not explicitly name an alternative path or state when not to use it, but there is no obvious sibling that competes for this operation.

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