Skip to main content
Glama
camerone05

shopify-admin-mcp-server

by camerone05

Create/Update Shopify Metafield

shopify_set_metafield
Idempotent

Create or update a metafield on Shopify resources such as products, collections, pages, or articles to store custom data by namespace, key, value, and type.

Instructions

Upsert a metafield on any resource you have write access to (products, collections, pages, articles).

Common types: single_line_text_field, multi_line_text_field, integer, boolean, json, url, color, date, file_reference

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
typeYesMetafield type e.g. single_line_text_field, json
valueYes
ownerIdYesOwner GID
namespaceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this is a non-destructive, idempotent, open-world write, and 'Upsert' is consistent with idempotentHint=true. The description reinforces the write-access requirement but adds no detail on overwrite semantics, error behavior for invalid types, or what happens to an existing metafield value. Some value, but thin beyond the annotations.

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?

Two compact sentences with the operation front-loaded and the type list separated. Efficient and readable, though the second sentence could be flagged as loosely formatted rather than fully earning its place.

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 5-required-param mutation with no output schema, the description covers the core action and the type vocabulary but omits key/namespace/value meaning and response behavior. Annotations cover the safety profile, so the remaining gaps are moderate rather than severe.

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 coverage is only 40%, with key, namespace, and value having no descriptions. The enumerated types list partially compensates for the `type` parameter and the resource list hints at ownerId, but namespace/key/value semantics are left entirely undocumented in both places.

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 (Upsert) and resource (metafield), plus the scope of applicable owner resources (products, collections, pages, articles). It cleanly separates itself from shopify_get_metafields and shopify_delete_metafield by naming the write operation.

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?

Prerequisite is implied with 'any resource you have write access to', which is useful context. However, it never states when to use this versus shopify_get_metafields or shopify_delete_metafield, nor any ordering/quoting guidance. Usage is inferable but not spelled out.

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