Skip to main content
Glama

create_payment_session

Creates a hosted payment session and returns a secure URL so customers can authorize their card, automatically initiating Visa Intelligent Commerce or Mastercard Agent Pay.

Instructions

Creates a hosted payment session and returns a secure URL for the customer to authorize their card. The session automatically initiates Visa Intelligent Commerce or Mastercard Agent Pay based on the customer's card on file — no additional integration required. REQUIRED FOLLOW-UP — every single time, with no exceptions: immediately return the url received in the response and present it, so the customer gets a clickable 'Open' button. Do this automatically without asking the user first, and do not just print or return the raw url as text.

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": {
      "email": "<email>",
      "price": "<price>",
      "purpose": "<purpose>"
    },
    "name": "create_payment_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailYesCustomer's email address — used to identify the customer and look up their card
priceYesPayment amount in USD, as a string with no currency symbol e.g. '700'
expiryNoISO 8601 timestamp after which the session URL is no longer valid. Default: 1 week from creation
purposeYesShort description of what the payment is for (e.g. agent name or product), shown to the customer during the payment flow
currencyNoCurrency code. Default: 'USD'
merchantUrlNoOptional website URL of the merchant the payment is for
merchantNameNoOptional display name of the merchant the payment is for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.6

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does add real value: it discloses the returned artifact (a secure URL), the automatic network-specific flow selection, and the required downstream handling of the URL. It does not state whether funds are captured or only authorized, what permissions are needed, what happens if no card is on file, or how errors surface — significant gaps for a payment mutation.

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

Conciseness3/5

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

The purpose is front-loaded and the return value is stated early, which is good. However, the follow-up block is roughly as long as the substantive description and is repetitive — 'every single time, with no exceptions', 'immediately', 'automatically without asking' — which crowds out more useful information about the transaction itself.

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

Completeness3/5

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

For a seven-parameter mutation tool with no annotations and no output schema, the definition covers the return value and the required presentation of the URL, which is the most important operational detail. It still leaves out authorization requirements, charge-versus-authorize semantics, failure modes, and how it relates to the sibling checkout tools.

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%, with each of the seven parameters documented in the schema including formats, defaults, and examples. The description adds nothing parameter-specific beyond a general reference to the customer's card being looked up, so the baseline of 3 applies.

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 a hosted payment session and returns a secure URL' — and explains that Visa Intelligent Commerce or Mastercard Agent Pay is selected from the card on file. It is clear what the tool produces, but it never names or distinguishes itself from siblings such as create_checkout or create_credential_session, which an agent must choose between.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of 'card on file' and 'no additional integration required' signals the card-on-file payment flow, but there is no explicit statement of when to prefer this over create_checkout or create_credential_session, and no preconditions such as the customer needing a stored card. The lengthy follow-up instruction governs post-call behavior, not tool selection.

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