Skip to main content
Glama

checkout

Generate a Stripe payment session for a product, returning a browser URL the user opens to complete payment. Credits provision automatically once payment succeeds.

Instructions

Create a Stripe checkout session for purchasing a product.

Returns a ``checkout_url`` — the user must open it in a browser to
complete payment. After payment, credits are provisioned automatically
via webhook.

If the agent has a USDC wallet, skip this entirely — just call
``generate`` and the x402 protocol handles payment on-chain.

Args:
    product_id: Product ID from ``get_products``.
    email: Account email (for Basic auth during onboarding).
    password: Account password (for Basic auth during onboarding).

Returns:
    Dict with ``checkout_url``. On failure, an ``isError`` result — e.g.
    ``error: "email_not_verified"`` until the user clicks the
    verification link, or ``"auth"`` / ``"failed"``.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailNo
passwordNo
product_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral weight and succeeds: it discloses that the tool returns a `checkout_url` the user must open, that credits are provisioned automatically via webhook, and that failures return `email_not_verified`, `auth`, or `failed` errors. This gives the agent accurate expectations about side effects and outcomes beyond any schema information.

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?

The description is well-structured and front-loaded: it opens with the core purpose, then covers the URL flow, the alternative routing, arguments, and return/error behavior. Every section contributes necessary decision-making information without filler.

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

Completeness5/5

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

For a checkout tool with an output schema and no annotations, the description covers the full call cycle: inputs, user action required, automatic credit provisioning, and failure modes. The agent has enough context to decide whether to use this tool and what to expect when invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so parameter explanations in the description are essential. All three parameters are addressed: `product_id` is sourced from `get_products`, and `email`/`password` are tied to Basic auth during onboarding. However, the description doesn't fully clarify when `email` and `password` are needed or what specific auth failures they prevent, so it is helpful but not exhaustive.

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 states a specific verb and resource: 'Create a Stripe checkout session for purchasing a product.' It also distinguishes itself from the sibling `generate` tool by explaining that on-chain payment should use `generate` instead, which makes the tool's role unambiguous.

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?

The description explicitly tells the agent when to skip this tool: 'If the agent has a USDC wallet, skip this entirely — just call `generate`.' It also instructs that `product_id` comes from `get_products`, giving a clear dependency between sibling tools. This is strong when-to-use vs alternative guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/maginaryai/maginary-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server