Skip to main content
Glama

select_shipping_option

Idempotent

Select a shipping method for the cart. Must call get_shipping_rates first and provide idempotency_key. Reuse the same key for retries of the same cart and option; use a new key if either changes.

PREFER THE CART CARD: if there is an interactive card for this cart, let the buyer pick shipping there instead of calling this tool yourself — it keeps the flow in one card instead of opening a new one per step. 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
agent_keyNoSandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.
idempotency_keyYesREQUIRED as an argument in this tool: the `Idempotency-Key` header or `_meta` alone is not enough. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation.
shipping_handleYesShipping method handle from get_shipping_rates

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYes
currencyYes
total_centsYes
selected_titleYes
shipping_centsYes
subtotal_centsYes
selected_handleYes
shipping_sourceYes
shipping_authoritativeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Required. Reuse this key only when retrying the same cart and shipping option; use a new key if either changes."New value: +"REQUIRED as an argument in this tool: the `Idempotency-Key` header or `_meta` alone is not enough. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation."
    • removedInput schema / properties / idempotency_key / minLength
      Removed value: -1
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare mutation, idempotency and non-destructive behavior, and the description goes well beyond them: it explains how to shape idempotency keys across retries, that a credential is required and how to obtain it without human login, and that an interactive card is the preferred path. This is exactly the context annotations cannot carry.

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 action and prerequisite in the first sentence, then the UI preference, then the credential path. Dense but every sentence earns its place; only minor repetition with the schema's idempotency note.

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?

Covers prerequisites, credential acquisition, idempotency semantics, and a preferred UI alternative, and an output schema exists so return values need not be described. An agent has everything required to invoke 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 real semantics: the retry contract for idempotency_key ('reuse the same key for retries of the same cart and option; use a new key if either changes') and the agent_key sourcing. It does not explain shipping_handle beyond what the schema already says.

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 ('Select a shipping method for the cart') and implicitly contrasts with get_shipping_rates, which it names as a prerequisite. An agent can distinguish this from sibling rate/checkout tools without opening 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit ordering ('Must call get_shipping_rates first'), explicit alternative ('PREFER THE CART CARD ... instead of calling this tool yourself'), and explicit credential path via create_sandbox_key. Names the checkout guide resource to read. Nothing is left 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