get_product_metafield
Retrieve a Shopify product's metafield by namespace and key, returning the value as JSON for use in integrations.
Instructions
Get a single metafield by namespace and key for a given product via GraphQL. Uses jsonValue for proper serialization.
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": {
"product_id": "<product_id>",
"namespace": "<namespace>",
"key": "<key>"
},
"name": "get_product_metafield"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | The numeric Shopify product ID (or GID like 'gid://shopify/Product/123'). | |
| namespace | Yes | The metafield namespace (e.g. 'custom'). | |
| key | Yes | The metafield key (e.g. 'skin_concerns'). |