Skip to main content
Glama
hectortemich

@deonpay/mcp-server

by hectortemich

Create a checkout session

deonpay_create_checkout_session

Creates an ephemeral checkout session for one-time payments, returning a URL to redirect customers and a session ID for later lookup.

Instructions

Create an ephemeral checkout session (Stripe-style). Use this when integrating an e-commerce flow: the user wants a one-time payment URL tied to a specific cart and a success_url to land on after payment. The response contains url (where to redirect the customer) and session_id (used to look up the session later). Amounts are in CENTAVOS. Mode defaults to 'redirect' — use 'embedded' or 'modal' only if the calling app already supports those flows. The session expires by default in 30 minutes (override with expires_in, range 5..1440).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
line_itemsYesAt least one line item. Each item is either a catalog reference {product_id, quantity} or inline {name, quantity, unit_amount}. unit_amount is in centavos.
success_urlYesWhere the customer is redirected after a successful payment. Supports {session_id} as a placeholder, e.g. https://my-shop.com/order/done?session_id={session_id}.
cancel_urlNoWhere the customer is redirected if they abandon checkout.
modeNoDisplay mode. Defaults to 'redirect'.
expires_inNoMinutes until the session expires (default 30, max 1440).
allow_msiNo
msi_optionsNo
customer_emailNo
customer_nameNo
customer_phoneNo
client_reference_idNoYour internal order/cart id for reconciliation.
metadataNo
customizationNoVisual overrides for the hosted page. Only the keys you set are merged into the merchant defaults.
custom_fieldsNo
localeNoCheckout UI language.
display_currencyNo
exchange_rateNo
allow_save_cardNoWhether the customer can save their card for future use.

Implementation Reference

  • The actual handler for deonpay_create_checkout_session. It POSTs the sanitized args (with undefined/null/empty values removed via `compact`) to /checkout/sessions on the DeonPay API, wrapped in safeHandler for error handling.
    safeHandler(async (args) => {
      return client.post("/checkout/sessions", compact(args));
    }),
Behavior3/5

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

The description discloses the response contains `url` and `session_id`, mentions expiry (30 min default, override with expires_in), and notes amounts are in centavos. With no annotations, it carries the full burden but omits details like side effects, required permissions, or idempotency.

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 concise (6 sentences) and well-structured, front-loading the key purpose and usage. Every sentence provides distinct value without redundancy.

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?

Given the tool's complexity (18 parameters, no output schema), the description covers the core purpose, response, and key constraints. However, it lacks details on numerous optional parameters and does not fully distinguish the tool from siblings like create_link or create_subscription.

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

Parameters2/5

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

The description adds limited value beyond the schema: it mentions centavos for amounts, mode default, and expiry range. With 18 parameters and ~50% schema description coverage, many optional fields (customer details, metadata, customization, etc.) are left unexplained.

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 creates an ephemeral checkout session for one-time payments (Stripe-style) and specifies the e-commerce use case, distinguishing it from siblings like subscription or link creation.

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 description provides context on when to use (e-commerce flow) and mode selection guidance ('redirect' default, 'embedded'/'modal' only if supported). However, it lacks explicit exclusions or comparisons to sibling tools like deonpay_create_link or deonpay_create_subscription.

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

Install Server

Other Tools

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/hectortemich/deonpay-mcp-server'

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