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

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. 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. 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