Skip to main content
Glama
shopcart-mcp
by Wals-pro

Create Store Cart Link

create_cart_link
Read-onlyIdempotent

Generate a read-only Shopify cart or checkout permalink from exact variant IDs and quantities, optionally verifying live stock via product handles.

Instructions

Generate a read-only Shopify browser cart or checkout permalink from exact numeric variant IDs and quantities, optionally verifying live availability via verify_handles.

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": {
      "store_url": "<store_url>",
      "items": "<items>"
    },
    "name": "create_cart_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo'cart' opens merchant storefront cart (?storefront=true, default); 'checkout' goes directly to checkout.cart
itemsYesLine items with numeric variant_id from get_product and quantity (1..99)
store_urlYesStore domain or HTTPS URL
discount_codeNoOptional discount/coupon code supplied by the user
verify_handlesNoRecommended: product handles whose variants should be verified for stock and price via /products/<handle>.js

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint, so the safety profile is covered and 'read-only' in the description is largely redundant. The description adds a modest behavioral note that availability can be checked live, but says nothing about failure handling for invalid variant IDs, rate limiting, or whether permalinks expire. With annotations doing most of the work, this is adequate but not rich.

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?

A single front-loaded sentence that identifies the action and output artifact immediately, with no filler. The trailing verify_handles clause is slightly compressed but still readable. Nothing needs to be cut, though it could be split for scannability.

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?

With 5 parameters, full schema coverage, and annotations covering safety and idempotency, the definition supplies enough to call the tool correctly. The output is implicitly a permalink, so no output schema is strictly needed. Minor gaps remain around error behavior and when verification should be enabled.

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 description coverage is 100%, so every parameter is already documented, including the cart/checkout enum, the 1..99 quantity range, and the discount code pattern. The description reinforces the 'exact numeric variant IDs and quantities' constraint and names verify_handles, but adds no format or behavioral detail beyond the schema. Baseline 3 applies when the schema carries the load.

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 and resource: generate a read-only Shopify cart or checkout permalink from numeric variant IDs and quantities. It clearly separates the two modes and names the verification option, so an agent can distinguish it from inspect_store/get_product/search_products by function. It stops short of explicitly naming which sibling supplies variant IDs, leaving that routing to the schema.

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?

Usage is only implied: the phrase 'from exact numeric variant IDs' hints that IDs must already be known, and verify_handles is flagged as optional. There is no explicit statement of when to prefer cart versus checkout mode, when to skip verification, or what to do if the user has no variant ID yet. That leaves meaningful selection decisions to the reader.

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