Skip to main content
Glama

Complete checkout (ChatGPT Instant Checkout)

complete_checkout

Called by ChatGPT (or any agent runtime supporting Stripe's Shared Payment Token flow) after the user clicks Pay in an inline payment widget. Receives the SPT, charges it via Stripe, and credits the user's TMV account synchronously. The checkout_session_id is the Stripe Checkout Session ID returned by top_up_credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buyerNo
payment_dataYes
checkout_session_idYesStripe Checkout Session ID minted by top_up_credits.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoTool result payload (JSON object)

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?

Disclosure goes beyond annotations: states synchronous charge and credit. Annotations indicate not read-only, not idempotent, not destructive; description aligns. No contradictions.

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?

Two sentences, front-loaded with key context and action. No unnecessary words. Efficiently conveys purpose and flow.

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?

Covers main behavioral flow and parameter linkage, but lacks detail on error conditions or prerequisites for buyer/payment_data. Output schema exists, so return values are covered.

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 33%; description adds meaning for checkout_session_id (links to top_up_credits). Other parameters (payment_data, buyer) rely mostly on schema descriptions. Partial compensation.

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 clearly states the tool completes checkout after user clicks Pay, using SPT, charging via Stripe, and crediting TMV account. It distinguishes from sibling top_up_credits by referencing its output.

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?

Specifies caller context (ChatGPT/agent runtime) and timing (after Pay click). References prerequisite top_up_credits via checkout_session_id. No explicit exclusions, but context is clear.

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