Skip to main content
Glama

Last Price

create_ucp_checkout

Open a UCP checkout session: pass line_items, and optionally buyer, context, payment, signals, cart_id, fulfillment, discounts, currency, idempotency_key and agentid_token. Pass the same idempotency_key with the same body to retry safely: you get the first session back instead of a second one. Pass agentid_token to have the session record you as a verified buying agent. It answers the session with its id and status. Needs a Last Price credential with price compute scope. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.

Input Schema

NameRequiredDescriptionDefault
buyerNoWho is buying.
cart_idNoThe cart this checkout comes from.
contextNoWhere the checkout happens: locale, country, channel and the like.
paymentNoThe payment handler and currency.
signalsNoWhere the buyer came from: referrer, utm values and device type.
currencyNoThe currency. Defaults to the first line item's, or USD.
discountsNoDiscount codes to apply.
line_itemsYesWhat is being bought.
fulfillmentNoHow the order is fulfilled: its methods.
agentid_tokenNoOptional: your AgentID ID token (from auth.agentid.com, issued for Last Price), sent as the AgentID-Token header so the quote records you as a verified buying agent. Leave it out to buy unverified.
idempotency_keyNoYour key for this checkout. Retrying with the same key and body returns the first session; the same key with a different body is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing auth scope requirements, the 403 failure mode for unclaimed workspaces, and the conditional idempotency behavior of key+body retries returning the original session. The only wrinkle is that this retry guarantee sits in mild tension with idempotentHint=false, which an agent must reconcile as 'safe only when a key is supplied'; the description does not state that without a key a second call creates a second session.

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-loaded with the action and required argument, then prerequisites and retry semantics. The one weak sentence is the roll-call of optional parameter names, which duplicates the schema and could be dropped; the rest earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter creation tool with nested objects and no output schema, the description covers auth, workspace state, idempotency and the return shape ('session with its id and status'). What is missing is the completion path: an agent is not told that a session created here must later be driven to completion via complete_ucp_checkout.

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 description coverage is 100% and every parameter carries its own docstring, so the baseline is 3. The description's enumeration of optional parameter names largely repeats the schema, adding only a little (agentid_token's verified-buyer effect and the currency default, both already in the schema).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Open a UCP checkout session', with the required input (line_items) named up front. It is clearly distinguishable from cancel_ucp_checkout, complete_ucp_checkout, update_ucp_checkout and get_ucp_checkout by verb, but never names those siblings, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Gives concrete preconditions for use: a Last Price credential with price compute scope, and a claimed workspace (sandbox keys from self-registration 403 until claimed). It also explains the retry scenario for re-calling with the same idempotency_key. It does not say where this sits in the flow relative to complete_ucp_checkout or update_ucp_checkout, so exclusions/alternatives are absent.

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