Skip to main content
Glama

Set shipping method

set_shipping_method
Idempotent

Select the shipping method for your cart's checkout using an option ID from get_shipping_options. Requires at least one item; unknown IDs return an error.

Instructions

Select the shipping method for the current cart's checkout by an id from get_shipping_options. Only 'worldwide' exists today and it is already the default, so this call is optional — use it when the human explicitly picks a method, or once more methods appear. Needs at least one item in the cart; an unknown option_id returns an error and changes nothing. Repeating it is harmless.

Input Schema

NameRequiredDescriptionDefault
option_idNoShipping option id from get_shipping_options (currently 'worldwide').

Output Schema

NameRequiredDescriptionDefault
okNo
errorNoUnknown option_id or empty cart.
shipping_methodNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations, the description adds meaningful operational context: an unknown option_id returns an error and changes nothing, and at least one item must be in the cart. It does slightly repeat the idempotentHint with 'Repeating it is harmless,' but it still contributes substantial precondition and failure semantics not present in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences are front-loaded with purpose, then optionality, then preconditions and error behavior. Every sentence adds practical value for an agent deciding whether to call it.

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?

For a simple one-parameter setter with an output schema, the description covers optionality, preconditions, error handling, and idempotency. Nothing material is missing for correct invocation.

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 coverage is 100%, so the schema already documents option_id as coming from get_shipping_options and currently being 'worldwide.' The description mostly reinforces this and adds error behavior, which is behavioral rather than parameter syntax or format detail.

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?

The description states a specific verb and resource ('Select the shipping method for the current cart's checkout') and ties the parameter to a named sibling ('get_shipping_options'). This clearly distinguishes it from the sibling that lists shipping options.

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?

It explicitly says the call is optional because only 'worldwide' exists today and is already default, and it names the condition for use: when the human explicitly picks a method or once more methods appear. That is explicit when-to-use guidance with a clear alternative context.

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