Skip to main content
Glama
kisasa

Shopify MCP Server

by kisasa

get-metafields

Retrieve metafields for any Shopify resource by owner ID, and filter with namespace.key keys to return only needed fields and reduce response size.

Instructions

Get metafields for any Shopify resource (products, orders, customers, variants, collections, etc.). Supports 'keys' filter to fetch only specific metafields by namespace.key.

Input Schema

NameRequiredDescriptionDefault
keysNoIMPORTANT: Always specify this when you only need specific metafields. Format: namespace.key (e.g. ['custom.color', 'custom.size']). Returns only matching metafields instead of all, significantly reducing response size. When provided, the 'namespace' parameter is ignored.
afterNoCursor for pagination
firstNoNumber of metafields to return (max 50)
ownerIdYesGID of the resource (product, order, customer, variant, collection, etc.)
namespaceNoFilter metafields by namespace. Ignored when 'keys' is provided.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden, and it says essentially nothing behavioral. 'Get' implies read-only, but nothing is said about pagination limits, response size behavior, required permissions, or ordering — all relevant for a list operation over arbitrary resources.

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?

Two front-loaded sentences with no filler: scope first, then the most impactful filtering capability. Nothing could be removed without losing information.

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

Completeness4/5

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

For a simple read tool with 100% schema coverage and no output schema, the description gives enough to call it correctly. It stops short of mentioning the required ownerId or pagination defaults, but those gaps are minor given the rich schema.

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 100%, so every parameter is already documented, including the detailed keys filter and its interaction with namespace. The description's mention of the keys filter by namespace.key restates the schema rather than adding new semantics, 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 (Get) and resource (metafields) and explicitly enumerates supported owner types (products, orders, customers, variants, collections). It is clearly distinct from mutation siblings like set-metafields and delete-metafields, though it doesn't explicitly name get-metafield-definitions as the schema-level alternative.

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?

The description hints at usage via the 'keys' filter note, implying this is a broad fetch that should be narrowed when possible. However, it never states when to prefer this over get-metafield-definitions or how it relates to set/delete siblings. Usage is implied rather than spelled out.

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