Skip to main content
Glama

shopify_update_metafield

DestructiveIdempotent

Update or create Shopify metafields on products, customers, orders, variants, or collections by specifying owner ID, namespace, key, value, and type.

Instructions

Create or update a metafield on a Shopify resource.

Args: owner_type: One of: PRODUCT, CUSTOMER, ORDER, VARIANT, COLLECTION. Defaults to PRODUCT. owner_id (required): Resource ID (numeric or GID). namespace (required): Metafield namespace. key (required): Metafield key. value (required): Metafield value (string-encoded per the type). type: Metafield type (e.g. single_line_text_field, number_integer, json). Defaults to single_line_text_field. project_id: Authenticated Project UUID. project_ref: Exact project correlation reference. connector_account_ref: Project-bound connector account alias. idempotency_key: Stable business-action identity. effect: Claimed read or write effect; Spring verifies it. approval_ref: Approved platform task UUID when resuming a write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNo
typeNo
valueNo
effectNo
owner_idNo
namespaceNo
owner_typeNo
project_idNo
project_refNo
approval_refNo
idempotency_keyNo
connector_account_refNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.1
    • addedInput schema / properties / approval_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Approval Ref"
      +}
    • addedInput schema / properties / connector_account_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Connector Account Ref"
      +}
    • addedInput schema / properties / effect
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Effect"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Idempotency Key"
      +}
    • addedInput schema / properties / project_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project Id"
      +}
    • addedInput schema / properties / project_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project Ref"
      +}
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already carry readOnlyHint=false, destructiveHint=true, and idempotentHint=true, and the description's 'Create or update' matches those hints rather than contradicting them. It adds some behavioral context not in the annotations, such as upsert semantics and that approval_ref is 'Approved platform task UUID when resuming a write', but it does not explain what gets overwritten, ownership of effects, or any side-effect caveats.

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 purpose is front-loaded in one clear sentence, followed by a compact Args list where every line adds parameter information. There is no filler, repetition, or disorganized prose.

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?

The description is functionally adequate for a 12-parameter write tool that has an output schema, but the cross-cutting fields (effect, idempotency_key, approval_ref, project_ref) are only glossed. An agent still lacks enough context to know when approval_ref is needed, what values effect can take, or how the platform's write-approval flow works; the missing usage guidance further reduces completeness.

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?

With 0% schema description coverage and no enums in the schema, the prose carries the full burden and mostly succeeds: it marks owner_id/namespace/key/value as required, lists valid owner_type values, gives type examples, and states defaults for owner_type and type. A few entries are thin ('Exact project correlation reference' is almost tautological, 'effect' is cryptically defined), and the schema's all-optional/default-null properties conflict slightly with the description's 'required' labels.

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 opening line names a concrete verb+resource ('Create or update a metafield on a Shopify resource') and the Args list narrows the target to PRODUCT/CUSTOMER/ORDER/VARIANT/COLLECTION. It is clear, but unlike the high-watermark examples it never explicitly contrasts itself with shopify_get_metafields or other sibling metafield tools, so an agent gets no explicit sibling differentiation.

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?

There is no statement of when to use this tool or when to prefer an alternative; the description only lists Args. The 'Create or update' phrasing implies upsert usage, but no exclusions or references to shopify_get_metafields/list_metafield_definitions are given, so the agent must infer selection context.

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