Skip to main content
Glama

get_shipping_rates

Get available shipping rates for the cart. Requires shipping_address — pass it in the call. If the buyer requests the cheapest option, use cheapest_shipping_handle when non-null; it is null when rates cannot be compared in the cart currency. Rates marked authoritative=false are estimates, not the final charge.

PREFER THE CART CARD: if create_cart returned an interactive card (the buyer can see and click it), let them enter the address and pick shipping there instead of calling this tool yourself — each top-level call you make here opens a new card in the transcript instead of updating the one already open. Only call it yourself when there is no interactive card (text-only client) or the buyer explicitly asks you to handle it in chat. Checkout guide: read the MCP resource trusteed://guides/checkout. CREDENTIAL: this store needs one. Call the create_sandbox_key tool first (it is in this tool list and needs no credential), then pass the key you get back as the agent_key argument — or as an Authorization: Bearer header if your client can set headers. Do not ask a person to log in: there is no human login for this store.

Input Schema

NameRequiredDescriptionDefault
cart_idYesCart session ID returned by create_cart
agent_keyNoSandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.
shipping_addressNoDestination address. Required: this tool does not prompt for it.

Output Schema

NameRequiredDescriptionDefault
ratesYes
cart_idYes
address_cityNo
address_countryNo
cheapest_shipping_handleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / shipping_address / properties / province_code / description
      Previous value: -"Province or state code (optional)"New value: +"Province or state code (optional): the subdivision part only, without the country prefix and not the full ISO 3166-2 code (e.g. \"CA\" for California, \"ON\" for Ontario, \"B\" for Barcelona; never \"US-CA\" or \"ES-B\"). Only the Shopify checkout prefill reads it."
  2. Changed3 schema fields changed
    • changedInput schema / properties / shipping_address / properties / address1 / description
      Previous value: -"Street address"New value: +"Street name and number, plus flat/door if any (e.g. \"Calle Mayor 1, 2B\")"
    • changedInput schema / properties / shipping_address / properties / country_code / description
      Previous value: -"ISO country code (e.g. US, CA)"New value: +"ISO 3166-1 alpha-2 country code, two letters (e.g. ES, US, CA). Never the country name."
    • changedInput schema / properties / shipping_address / properties / zip / description
      Previous value: -"Postal / ZIP code"New value: +"Postal / ZIP code exactly as written, keeping leading zeros (e.g. \"08001\")"
  3. Changed2 schema fields changed
    • addedOutput schema / properties / cheapest_shipping_handle
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "cart_id",
      -  "rates"
      -]New value: +[
      +  "cart_id",
      +  "rates",
      +  "cheapest_shipping_handle"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / shipping_address / description
      Previous value: -"Destination address. Omit to collect via elicitation (Claude.ai)."New value: +"Destination address. Required: this tool does not prompt for it."
  5. Changed1 schema field changed
    • removedInput schema / properties / payment_mandate
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": {},
      -      "type": "object"
      -    },
      -    {
      -      "type": "string"
      -    }
      -  ],
      -  "description": "Payment mandate with `mandate_id`, `max_amount_cents` (integer, minor units), `currency` (3 letters, must match the cart's), `exp` (expiry as an INTEGER of Unix seconds — not an ISO 8601 date string), `sub` (your agent id) and `aud` (the store slug this mandate is for, e.g. the slug in the URL you are calling — not a domain). Use this when your client cannot set an `X-Payment-Mandate` header."
      -}
  6. Changed1 schema field changed
    • changedInput schema / properties / payment_mandate / description
      Previous value: -"Payment mandate with `mandate_id`, `max_amount_cents`, `currency`, `exp`, `sub`, `aud`. Its `currency` must match the cart's. Use this when your client cannot set an `X-Payment-Mandate` header."New value: +"Payment mandate with `mandate_id`, `max_amount_cents` (integer, minor units), `currency` (3 letters, must match the cart's), `exp` (expiry as an INTEGER of Unix seconds — not an ISO 8601 date string), `sub` (your agent id) and `aud` (the store slug this mandate is for, e.g. the slug in the URL you are calling — not a domain). Use this when your client cannot set an `X-Payment-Mandate` header."
  7. Changed2 schema fields changed
    • addedInput schema / properties / agent_key
      Added value: +{
      +  "description": "Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.",
      +  "type": "string"
      +}
    • addedInput schema / properties / payment_mandate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "type": "object"
      +    },
      +    {
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Payment mandate with `mandate_id`, `max_amount_cents`, `currency`, `exp`, `sub`, `aud`. Its `currency` must match the cart's. Use this when your client cannot set an `X-Payment-Mandate` header."
      +}
  8. Changed4 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedInput schema / properties / shipping_address / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / rates / items / additionalProperties
      Previous value: -falseNew value: +true
  9. Changed3 schema fields changed
    • addedOutput schema / properties / rates / items / properties / authoritative
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / rates / items / properties / source
      Added value: +{
      +  "enum": [
      +    "platform",
      +    "merchant_policy",
      +    "estimated"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / rates / items / required
      Previous value: -[
      -  "handle",
      -  "title",
      -  "price",
      -  "currency"
      -]New value: +[
      +  "handle",
      +  "title",
      +  "price",
      +  "currency",
      +  "source",
      +  "authoritative"
      +]
  10. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "address_city": {
      +      "type": "string"
      +    },
      +    "address_country": {
      +      "type": "string"
      +    },
      +    "cart_id": {
      +      "type": "string"
      +    },
      +    "rates": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "currency": {
      +            "type": "string"
      +          },
      +          "estimated_delivery": {
      +            "type": "string"
      +          },
      +          "handle": {
      +            "type": "string"
      +          },
      +          "price": {
      +            "type": "number"
      +          },
      +          "title": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "handle",
      +          "title",
      +          "price",
      +          "currency"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "cart_id",
      +    "rates"
      +  ],
      +  "type": "object"
      +}
  11. Changed4 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties
      Added value: +{
      +  "cart_id": {
      +    "description": "Cart session ID returned by create_cart",
      +    "type": "string"
      +  },
      +  "shipping_address": {
      +    "additionalProperties": false,
      +    "description": "Destination address. Omit to collect via elicitation (Claude.ai).",
      +    "properties": {
      +      "address1": {
      +        "description": "Street address",
      +        "type": "string"
      +      },
      +      "city": {
      +        "description": "City",
      +        "type": "string"
      +      },
      +      "country_code": {
      +        "description": "ISO country code (e.g. US, CA)",
      +        "type": "string"
      +      },
      +      "province_code": {
      +        "description": "Province or state code (optional)",
      +        "type": "string"
      +      },
      +      "zip": {
      +        "description": "Postal / ZIP code",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "address1",
      +      "city",
      +      "country_code",
      +      "zip"
      +    ],
      +    "type": "object"
      +  }
      +}
    • addedInput schema / required
      Added value: +[
      +  "cart_id"
      +]
  12. Changed5 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties
      Removed value: -{
      -  "cart_id": {
      -    "description": "Cart session ID returned by create_cart",
      -    "type": "string"
      -  },
      -  "shipping_address": {
      -    "additionalProperties": false,
      -    "description": "Destination address. Omit to collect via elicitation (Claude.ai).",
      -    "properties": {
      -      "address1": {
      -        "description": "Street address",
      -        "type": "string"
      -      },
      -      "city": {
      -        "description": "City",
      -        "type": "string"
      -      },
      -      "country_code": {
      -        "description": "ISO country code (e.g. US, CA)",
      -        "type": "string"
      -      },
      -      "province_code": {
      -        "description": "Province or state code (optional)",
      -        "type": "string"
      -      },
      -      "zip": {
      -        "description": "Postal / ZIP code",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "address1",
      -      "city",
      -      "country_code",
      -      "zip"
      -    ],
      -    "type": "object"
      -  }
      -}
    • removedInput schema / required
      Removed value: -[
      -  "cart_id"
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "address_city": {
      -      "type": "string"
      -    },
      -    "address_country": {
      -      "type": "string"
      -    },
      -    "cart_id": {
      -      "type": "string"
      -    },
      -    "rates": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "currency": {
      -            "type": "string"
      -          },
      -          "estimated_delivery": {
      -            "type": "string"
      -          },
      -          "handle": {
      -            "type": "string"
      -          },
      -          "price": {
      -            "type": "number"
      -          },
      -          "title": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "handle",
      -          "title",
      -          "price",
      -          "currency"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "cart_id",
      -    "rates"
      -  ],
      -  "type": "object"
      -}New value: +null
  13. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses that authoritative=false rates are estimates rather than final charges, that cheapest_shipping_handle is null when rates cannot be compared in the cart currency, and that each top-level call opens a new card in the transcript. The credential requirement is also documented. Annotations (readOnlyHint=false, non-idempotent) do not cover any of this, and nothing contradicts them.

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 purpose, then the card preference, then the credential flow, so the important routing rule comes early. It is dense and a little long, with the credential repeated across the description and schema, but nearly every sentence carries operational information an agent needs.

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?

Output schema exists and return values are not restated, yet the one return-field semantic an agent actually needs (authoritative=false meaning estimates) is given. Combined with the address requirement, credential flow, and card-vs-chat decision, nothing needed to call this correctly is missing.

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 coverage is 100%, so baseline 3 applies, but the description adds real meaning: it states shipping_address must be supplied in the call and that the tool will not prompt for it, and it explains the agent_key credential's purpose and the alternative Authorization header path. That is value beyond the schema text.

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+resource ("Get available shipping rates for the cart") and immediately scopes it against the sibling flow by pointing to select_shipping_option territory via cheapest_shipping_handle. An agent can tell it apart from create_cart or select_shipping_option without opening a 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?

Explicit when-not-to-use guidance: prefer the cart card and let the buyer pick shipping there, only call directly when there is no interactive card or the buyer explicitly asks. It also names the checkout guide resource and the prerequisite create_sandbox_key tool, so the routing decision and the setup path are both unambiguous.

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.

Resources