Skip to main content
Glama

Check a product CSV before import

csv_import_preflight
Read-onlyIdempotent

Best for: "will this Shopify CSV import?" or "what is wrong with my product file?". Checks the Shopify import rules: columns, handles, options, duplicate variants, statuses, value types (price, weight, quantity, true/false), image URLs, GTIN check digits and barcodes a spreadsheet mangled. Returns: blocking findings (Shopify rejects them or imports them wrong) and warnings, up to 200 each, each with row, handle, rule, fix and doc (the rule's source page), plus totals. Input tips: send csv, the full file text from Shopify admin (Products > Export), header row first, up to 2 MB; a larger file is refused with csv_too_large, split it by rows. Not for: Merchant Center title and description rules or a store address (use merchant_feed_check), or listing text (use listing_text_audit).

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": {
      "csv": "<csv>"
    },
    "name": "csv_import_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvYesThe full text of a Shopify product CSV, header row first, such as "Title,URL handle,Description,Vendor,Price,...". Paste the file exported from Shopify admin (Products > Export) as it is. At most 2 MB; split a larger file by rows and repeat the header in each part. Example call: {"csv": "Title,URL handle,Price\nWool Beanie,wool-beanie,24.00"}

Output Schema

NameRequiredDescriptionDefault
rowsYesData rows in the file, header not counted
totalsYesCounts before the lists were cut to 200
blockingYesProblems Shopify rejects or that make the import wrong, at most 200
productsYesProducts found, one per URL handle
warningsYesProblems that import but probably not as intended, at most 200
truncatedYesTrue when either list had more than 200 findings

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedOutput schema / properties / blocking / items / properties / doc
      Added value: +{
      +  "description": "The page that states the rule: Shopify help, GS1 for a GTIN check digit, or Microsoft for spreadsheet notation",
      +  "format": "uri",
      +  "type": "string"
      +}
    • changedOutput schema / properties / blocking / items / properties / rule / enum
      Previous value: -[
      -  "missing-required-column",
      -  "missing-handle",
      -  "missing-title",
      -  "invalid-status",
      -  "option-without-name",
      -  "variant-option-missing",
      -  "duplicate-variant",
      -  "bad-price",
      -  "bad-compare-at-price",
      -  "inventory-file",
      -  "legacy-headers",
      -  "unknown-columns",
      -  "encoding",
      -  "non-contiguous-handle",
      -  "invalid-handle",
      -  "compare-at-not-higher",
      -  "scientific-notation",
      -  "image-url-not-https",
      -  "bad-image-position",
      -  "duplicate-sku"
      -]New value: +[
      +  "missing-required-column",
      +  "missing-handle",
      +  "missing-title",
      +  "invalid-status",
      +  "option-without-name",
      +  "variant-option-missing",
      +  "duplicate-variant",
      +  "bad-price",
      +  "bad-compare-at-price",
      +  "bad-cost",
      +  "bad-weight",
      +  "bad-weight-unit",
      +  "bad-inventory-quantity",
      +  "bad-inventory-policy",
      +  "bad-boolean",
      +  "barcode-columns",
      +  "partial-packed-size",
      +  "inventory-file",
      +  "legacy-headers",
      +  "unknown-columns",
      +  "encoding",
      +  "non-contiguous-handle",
      +  "invalid-handle",
      +  "compare-at-not-higher",
      +  "scientific-notation",
      +  "bad-gtin",
      +  "image-url-not-https",
      +  "bad-image-position",
      +  "duplicate-sku"
      +]
    • changedOutput schema / properties / blocking / items / required
      Previous value: -[
      -  "row",
      -  "handle",
      -  "rule",
      -  "fix"
      -]New value: +[
      +  "row",
      +  "handle",
      +  "rule",
      +  "fix",
      +  "doc"
      +]
    • addedOutput schema / properties / warnings / items / properties / doc
      Added value: +{
      +  "description": "The page that states the rule: Shopify help, GS1 for a GTIN check digit, or Microsoft for spreadsheet notation",
      +  "format": "uri",
      +  "type": "string"
      +}
    • changedOutput schema / properties / warnings / items / properties / rule / enum
      Previous value: -[
      -  "missing-required-column",
      -  "missing-handle",
      -  "missing-title",
      -  "invalid-status",
      -  "option-without-name",
      -  "variant-option-missing",
      -  "duplicate-variant",
      -  "bad-price",
      -  "bad-compare-at-price",
      -  "inventory-file",
      -  "legacy-headers",
      -  "unknown-columns",
      -  "encoding",
      -  "non-contiguous-handle",
      -  "invalid-handle",
      -  "compare-at-not-higher",
      -  "scientific-notation",
      -  "image-url-not-https",
      -  "bad-image-position",
      -  "duplicate-sku"
      -]New value: +[
      +  "missing-required-column",
      +  "missing-handle",
      +  "missing-title",
      +  "invalid-status",
      +  "option-without-name",
      +  "variant-option-missing",
      +  "duplicate-variant",
      +  "bad-price",
      +  "bad-compare-at-price",
      +  "bad-cost",
      +  "bad-weight",
      +  "bad-weight-unit",
      +  "bad-inventory-quantity",
      +  "bad-inventory-policy",
      +  "bad-boolean",
      +  "barcode-columns",
      +  "partial-packed-size",
      +  "inventory-file",
      +  "legacy-headers",
      +  "unknown-columns",
      +  "encoding",
      +  "non-contiguous-handle",
      +  "invalid-handle",
      +  "compare-at-not-higher",
      +  "scientific-notation",
      +  "bad-gtin",
      +  "image-url-not-https",
      +  "bad-image-position",
      +  "duplicate-sku"
      +]
    • changedOutput schema / properties / warnings / items / required
      Previous value: -[
      -  "row",
      -  "handle",
      -  "rule",
      -  "fix"
      -]New value: +[
      +  "row",
      +  "handle",
      +  "rule",
      +  "fix",
      +  "doc"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / csv / description
      Previous value: -"The full text of a Shopify product CSV, header row first, such as \"Title,URL handle,Description,Vendor,Price,...\". Paste the file exported from Shopify admin (Products > Export) as it is. At most 2 MB; split a larger file by rows and repeat the header in each part."New value: +"The full text of a Shopify product CSV, header row first, such as \"Title,URL handle,Description,Vendor,Price,...\". Paste the file exported from Shopify admin (Products > Export) as it is. At most 2 MB; split a larger file by rows and repeat the header in each part. Example call: {\"csv\": \"Title,URL handle,Price\\nWool Beanie,wool-beanie,24.00\"}"
  3. Changed21 schema fields changed
    • changedInput schema / properties / csv / description
      Previous value: -"The product CSV text exactly as exported from Shopify, header row included. At most 2 MB."New value: +"The full text of a Shopify product CSV, header row first, such as \"Title,URL handle,Description,Vendor,Price,...\". Paste the file exported from Shopify admin (Products > Export) as it is. At most 2 MB; split a larger file by rows and repeat the header in each part."
    • addedOutput schema / properties / blocking / items / properties / fix / description
      Added value: +"What to change in the file, in plain words"
    • addedOutput schema / properties / blocking / items / properties / handle / description
      Added value: +"The product's URL handle; empty for a finding about the whole file"
    • addedOutput schema / properties / blocking / items / properties / row / minimum
      Added value: +0
    • addedOutput schema / properties / blocking / items / properties / rule / description
      Added value: +"Rule id, such as bad-price or missing-required-column"
    • addedOutput schema / properties / blocking / items / properties / rule / enum
      Added value: +[
      +  "missing-required-column",
      +  "missing-handle",
      +  "missing-title",
      +  "invalid-status",
      +  "option-without-name",
      +  "variant-option-missing",
      +  "duplicate-variant",
      +  "bad-price",
      +  "bad-compare-at-price",
      +  "inventory-file",
      +  "legacy-headers",
      +  "unknown-columns",
      +  "encoding",
      +  "non-contiguous-handle",
      +  "invalid-handle",
      +  "compare-at-not-higher",
      +  "scientific-notation",
      +  "image-url-not-https",
      +  "bad-image-position",
      +  "duplicate-sku"
      +]
    • addedOutput schema / properties / products / description
      Added value: +"Products found, one per URL handle"
    • addedOutput schema / properties / products / minimum
      Added value: +0
    • addedOutput schema / properties / rows / description
      Added value: +"Data rows in the file, header not counted"
    • addedOutput schema / properties / rows / minimum
      Added value: +0
    • addedOutput schema / properties / totals / description
      Added value: +"Counts before the lists were cut to 200"
    • addedOutput schema / properties / totals / properties / blocking / description
      Added value: +"All blocking findings"
    • addedOutput schema / properties / totals / properties / blocking / minimum
      Added value: +0
    • addedOutput schema / properties / totals / properties / warnings / description
      Added value: +"All warnings"
    • addedOutput schema / properties / totals / properties / warnings / minimum
      Added value: +0
    • addedOutput schema / properties / truncated / description
      Added value: +"True when either list had more than 200 findings"
    • addedOutput schema / properties / warnings / items / properties / fix / description
      Added value: +"What to change in the file, in plain words"
    • addedOutput schema / properties / warnings / items / properties / handle / description
      Added value: +"The product's URL handle; empty for a finding about the whole file"
    • addedOutput schema / properties / warnings / items / properties / row / minimum
      Added value: +0
    • addedOutput schema / properties / warnings / items / properties / rule / description
      Added value: +"Rule id, such as bad-price or missing-required-column"
    • addedOutput schema / properties / warnings / items / properties / rule / enum
      Added value: +[
      +  "missing-required-column",
      +  "missing-handle",
      +  "missing-title",
      +  "invalid-status",
      +  "option-without-name",
      +  "variant-option-missing",
      +  "duplicate-variant",
      +  "bad-price",
      +  "bad-compare-at-price",
      +  "inventory-file",
      +  "legacy-headers",
      +  "unknown-columns",
      +  "encoding",
      +  "non-contiguous-handle",
      +  "invalid-handle",
      +  "compare-at-not-higher",
      +  "scientific-notation",
      +  "image-url-not-https",
      +  "bad-image-position",
      +  "duplicate-sku"
      +]
  4. Changed1 schema field changed
    • removedOutput schema / properties / note_from_openkrill
      Removed value: -{
      -  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      -  "type": "string"
      -}
  5. Changed1 schema field changed
    • addedOutput schema / properties / note_from_openkrill
      Added value: +{
      +  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      +  "type": "string"
      +}
  6. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description adds genuine behavior beyond that: a 200-item cap per finding class and the fact that an oversized file is refused with the error code csv_too_large. The return-field listing is partly redundant with the existing output schema, which keeps this from a 5.

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-loads the use case, then behavior, then input tips, then exclusions — a sensible order with no filler sentences. It is a dense single block of four labeled segments, so scanning takes slightly more effort than a tighter version would.

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 single-parameter read-only validator with a full output schema, the description supplies everything an agent needs: purpose, routing to siblings, size limit with failure behavior, and input format. Nothing material is missing.

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?

Only one parameter and schema description coverage is 100%, so the schema already carries the format, the 2 MB cap, and the Shopify-admin export provenance. The description's input tips restate that same guidance rather than adding new meaning, so the baseline of 3 applies.

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 ("Checks the Shopify import rules") and enumerates the concrete rule families covered: columns, handles, options, duplicate variants, statuses, value types, image URLs, GTIN check digits. An agent can distinguish it from merchant_feed_check and listing_text_audit without opening any schema.

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?

Opens with the exact user questions it answers ("will this Shopify CSV import?", "what is wrong with my product file?") and closes with an explicit "Not for" section naming both alternatives and the condition that routes to each. When-to-use, when-not-to-use, and alternatives are all present.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.