Skip to main content
Glama

Create a mail order

create_order
Idempotent

Creates an order from a quote, with a spending cap, acceptance of the standardized address, the sender's US return address and an idempotency key. The same key with the same request returns the same order. Payment methods: checkout returns a link for a person to approve and pay; mpp and x402 return payment_url for an authorized payment client, when enabled; mandate charges a card saved under a standing permission at once if the letter is inside its limits, and otherwise refuses the order with mandate_declined.

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": {
      "quote_id": "<quote_id>",
      "quote_token": "<quote_token>",
      "max_amount_cents": "<max_amount_cents>",
      "idempotency_key": "<idempotency_key>",
      "accept_standardized_address": "<accept_standardized_address>",
      "sender": "<sender>"
    },
    "name": "create_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
senderYes
quote_idYes
mandate_idNo
quote_tokenYes
mandate_tokenNo
payment_methodNo
idempotency_keyYes
max_amount_centsYes
accept_standardized_addressYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / sender / properties / address_line1 / maxLength
      Previous value: -100New value: +64
    • changedInput schema / properties / sender / properties / address_line2 / maxLength
      Previous value: -100New value: +64
    • addedInput schema / properties / sender / properties / company
      Added value: +{
      +  "maxLength": 40,
      +  "type": "string"
      +}
    • changedInput schema / properties / sender / properties / name / maxLength
      Previous value: -80New value: +40
  2. Changed3 schema fields changed
    • addedInput schema / properties / mandate_id
      Added value: +{
      +  "pattern": "^man\\_",
      +  "type": "string"
      +}
    • addedInput schema / properties / mandate_token
      Added value: +{
      +  "maxLength": 100,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / payment_method / enum
      Previous value: -[
      -  "checkout",
      -  "mpp",
      -  "x402"
      -]New value: +[
      +  "checkout",
      +  "mpp",
      +  "x402",
      +  "mandate"
      +]
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already declare idempotentHint=true and openWorldHint=true, and the description adds genuine value on top: it states the idempotency contract ('same key with the same request returns the same order'), the return value per payment method (link vs payment_url), and a named failure mode (mandate_declined when outside mandate limits). It does not discuss authorization requirements or what happens on a retry with a mismatched request body.

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?

Three sentences, front-loaded with the core action and the creation contract, then payment-mode behavior. Dense but every clause carries information; the only mild weakness is that the payment-mode sentence packs three distinct branches with semicolons.

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 9-parameter, nested-object mutation with no output schema, the description supplies the critical unknown: what each payment method returns and how mandate failure surfaces. Remaining gaps are the shape of the returned order object and the token-pairing rules, but the agent can invoke the tool correctly with what is given.

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 0% across 9 parameters, so the description must carry the load. It does explain conceptually what quote, max_amount_cents, accept_standardized_address, sender, idempotency_key and payment_method mean, but it never clarifies the quote_id/quote_token or mandate_id/mandate_token pairing, nor that accept_standardized_address is constrained to true, nor the 16-character minimum on the key.

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?

The description opens with a specific verb and resource, 'Creates an order from a quote,' and enumerates the required inputs (spending cap, standardized address acceptance, US return address, idempotency key). It distinguishes the creation step from the quoting step that precedes it, though it never names a sibling tool explicitly.

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?

The payment_method paragraph effectively tells an agent which mode to pick: checkout when a human will approve and pay via link, mpp/x402 when an authorized payment client is available, mandate when a saved card can be charged immediately. It does not cover preconditions such as needing a valid mandate_id/mandate_token pair or the relationship to create_mandate/quote_document.

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