Skip to main content
Glama

Compare one item

compare_item
Read-only

Compare one item across two Shopify stores: check if each has it, list differing fields, and verify referenced items exist in the target. Use for a targeted check instead of a full store diff.

Instructions

Compare a single item between two stores, side by side: whether each has it, every field that differs (entry by entry inside JSON values), and whether the items it points at (products, pages, metaobjects...) exist in the target. Reads only that item where possible, so it is quick. Returns { status (identical, different, only in source, only in target, in neither), changes, refs, notCompared }. Use it for a targeted check instead of diff_stores; take the key from a diff_stores result.

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": {
      "source": "<source>",
      "target": "<target>",
      "resource": "<resource>",
      "key": "<key>"
    },
    "name": "compare_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe item's key, as diff_stores lists it: "size_guide/shirts" (metaobjects), "faq" (pages), "PRODUCT.custom.fabric" (metafield_definitions)...
formatNo"markdown" returns a report.
sourceYesStore alias, or "dir:<path>" for a snapshot folder made with export_snapshot.
targetYesStore alias, or "dir:<path>" for a snapshot folder made with export_snapshot.
resourceYesResource type of the item

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered; the description adds real context beyond that, describing read scope ('reads only that item where possible, so it is quick') and the follow-on reference existence check in the target. It also spells out the return shape, which no output schema provides. Minor gap: 'where possible' hints at fallback behavior that is never explained.

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-loaded with the purpose, then what is reported, then the routing advice and return shape. Dense but zero filler; the parenthetical field enumeration is slightly run-on and could be tightened, but nothing is redundant.

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 five-parameter read-only comparison tool with no output schema, the description covers purpose, deterministic field-level comparison depth, reference checking, the return object's fields, and when to prefer it over diff_stores. An agent has everything needed to call it correctly and interpret the result.

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 description coverage is 100%, so the baseline is 3, and the description earns an extra point by tying the key parameter to its origin ('take the key from a diff_stores result'), which the schema's format examples do not say. It does not discuss source/target snapshot semantics or the format parameter, but those are already documented in the schema.

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 ('Compare a single item between two stores, side by side') and enumerates what the comparison covers: existence, per-field differences down to entries inside JSON values, and reference existence in the target. It also names the sibling it is a narrower alternative to (diff_stores), so an agent can separate the two immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes usage: 'Use it for a targeted check instead of diff_stores' names the alternative and the condition that selects this tool, and 'take the key from a diff_stores result' tells the agent where the key input comes from. No inference required.

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