Skip to main content
Glama

Prepare a payment quote

create_payment_quote
Idempotent

Use this when you pay for the book on the person's behalf. Prepares a fixed payment quote for a printed book, including shipping, for MPP and, when listed, x402 (USDC on Base). Requires a complete delivery address, and email for the order confirmation when the book is not saved to an account yet. No charge yet. Ask the user to confirm the total and address before paying: pay_book for MPP, or POST paymentUrl with an x402 client for USDC. Quote expires after 15 minutes.

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": {
      "bookId": "<bookId>",
      "bookToken": "<bookToken>",
      "country": "<country>",
      "idempotencyKey": "<idempotencyKey>",
      "shippingAddress": "<shippingAddress>"
    },
    "name": "create_payment_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailNo
bookIdYes
countryYes
quantityNo
bookTokenYes
idempotencyKeyYes
shippingAddressYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / email
      Added value: +{
      +  "format": "email",
      +  "maxLength": 200,
      +  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses the critical non-obvious behavior: 'No charge yet', a 15-minute quote expiry, and the requirement for a complete delivery address plus a conditional email. These are exactly the facts an agent needs to avoid double-charging or using a stale quote.

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?

Front-loads the trigger, then the prerequisites, then the confirmation/payment path, closing with the expiry constraint. Every sentence carries an actionable fact with no padding.

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?

No output schema, so the description must cover returns and post-call behavior; it does so by naming the quote's payment methods and expiry, and by telling the agent to confirm before paying. Minor gap: the idempotencyKey parameter is neither explained nor tied to the idempotentHint annotation.

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% for 7 parameters including a nested address object, so the description must compensate more than it does. It adds genuine meaning for email (required when the book isn't saved to an account) and for shippingAddress completeness, but says nothing about bookToken, bookId, country, quantity, or idempotencyKey.

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 ('Prepares a fixed payment quote for a printed book, including shipping') and names the payment rails it supports (MPP and x402/USDC on Base). It is clearly distinguishable from pay_book, which it explicitly routes to.

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?

Opens with the trigger condition ('Use this when you pay for the book on the person's behalf') and spells out the follow-up path: confirm the total with the user, then pay_book for MPP or POST paymentUrl with an x402 client. The alternative and its selection condition are explicit.

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