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.

SKYFIRE TOKEN (optional): Pass a kya or kya-pay token in the skyfire-pay-id header to boost trust score. No token required — request proceeds normally if omitted. Checkout guide: https://trusteed.xyz/.well-known/agent-checkout-guide.json. 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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
ratesYes
cart_idYes
address_cityNo
address_countryNo
cheapest_shipping_handleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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\")"
  2. 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"
      +]
  3. 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."
  4. 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."
      -}
  5. 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."
  6. 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."
      +}
  7. 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
  8. 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"
      +]
  9. 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"
      +}
  10. 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"
      +]
  11. 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
  12. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false, and the description explains exactly why: each top-level call opens a new card in the transcript rather than updating the existing one. It further discloses credential requirements, that authoritative=false rates are estimates, the nullability of cheapest_shipping_handle, and that the skyfire token is optional — rich context beyond the annotations.

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 purpose, then the cart-card routing rule, then credential details. It is on the longer side with a URL and repeated credential instructions, but nearly every sentence carries actionable information, so little is wasted.

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?

With an output schema present, return values need not be explained. The description covers purpose, usage routing, prerequisites, credential path, and rate semantics — everything an agent needs to call this correctly.

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 is 3, but the description adds meaning the schema omits: it states shipping_address is effectively required ('this tool does not prompt for it') even though the schema lists only cart_id as required, and clarifies agent_key can be replaced by an Authorization header.

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 implicitly differentiates from the selection sibling by focusing on retrieval vs. choosing an option. An agent can immediately tell what this returns and what it needs.

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 the agent: 'PREFER THE CART CARD... Only call it yourself when there is no interactive card (text-only client) or the buyer explicitly asks.' It also gives the cheapest-option path and the create_sandbox_key prerequisite, leaving little to inference.

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