Skip to main content
Glama

Signed AP2 cart for a fixed-price product

create_cart_mandate
Read-only

Creates an AP2-style CartMandate for one fixed-price product, signed by MDJ (ES256 JWS, public key at https://app.mydailyjourneys.com/.well-known/mdj-ap2-jwks.json). Valid for 30 minutes. Payment is completed on the normal store checkout page in checkout_url, never through this server. Ground services cannot be put in a cart.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "product_id": "<product_id>"
    },
    "name": "create_cart_mandate"
  }
}

Input Schema

NameRequiredDescriptionDefault
product_idYesAn id from list_products.
variant_idNoRequired for products with variants (custom-trip-itinerary-planning).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond readOnlyHint=true and openWorldHint=false, it discloses meaningful behavior: the mandate is signed with ES256 JWS, the verification key is published at a specific JWKS URL, and the mandate expires after 30 minutes. The explicit statement that payment never occurs on this server reinforces rather than contradicts the read-only annotation. It does not describe the response payload beyond referencing checkout_url.

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 short sentences, front-loaded with the core action and signature scheme, then constraints and the payment boundary. Every sentence carries operative information with no filler.

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 a two-parameter, non-mutating tool with no output schema, the definition covers signing, expiry, key location, and where payment occurs. The only real gap is that the shape of the returned mandate (fields beyond checkout_url) is not described.

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 both parameters are already documented, including that product_id comes from list_products and variant_id is required for variant products. The description adds only indirect meaning via 'one fixed-price product,' leaving the parameter layer to the schema.

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 names a specific verb and resource ('Creates an AP2-style CartMandate') and narrows the scope to 'one fixed-price product,' plus an explicit exclusion ('Ground services cannot be put in a cart'). An agent can tell immediately what artifact this produces and which products are out of scope.

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?

It states two concrete use conditions: only for single fixed-price products, and never for ground services, which routes the agent away from invalid calls. It also clarifies that payment happens on the external checkout page in checkout_url rather than through this tool. It stops short of naming a sibling tool to use for the excluded cases.

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