Skip to main content
Glama
Yolfi
by yolfinance

Create Yolfi Checkout Session

yolfi_checkout_sessions_create

Create a hosted checkout session from an existing paylink or approved standalone amount and currency, with idempotency keys for safe retries.

Instructions

Create hosted checkout for an existing paylink or a server-approved standalone amount and currency. Reuse the same idempotencyKey for the same order on retries.

Input Schema

NameRequiredDescriptionDefault
amountNoPositive decimal string for standalone checkout, calculated by trusted server code.
currencyNoRequired for standalone checkout. Must match the approved order currency.
metadataNoFlat non-secret metadata with string, finite number, or boolean values.
cancelUrlNoApproved return URL when checkout is cancelled.
paylinkIdNoExisting paylink ID. Omit amount and currency when supplied; the paylink determines the price.
successUrlNoApproved return URL after checkout. A redirect is not proof of payment.
descriptionNoOptional customer-facing description of the approved purchase.
customerNameNoOptional customer name already known to the merchant.
customerEmailNoOptional known customer email. Checkout must collect an email before creating a payment if it is absent.
idempotencyKeyNoStable retry key, required for standalone sessions and recommended for every order. Reuse with the identical request.
subscriptionIdNoExisting subscription ID for a paylink-backed session only.
merchantOrderIdNoStable merchant-side order identifier for reconciliation.
expiresInMinutesNoCheckout lifetime in minutes; defaults to 60.
clientReferenceIdNoStable merchant customer or user ID for webhook attribution.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=true and idempotentHint=false, so the safety profile is covered. The description usefully adds that retries are made safe by keying on idempotencyKey rather than by default idempotency, which is consistent with idempotentHint=false. It says nothing about what happens on an idempotency-key conflict, whether sessions can be re-fetched, or what the call returns.

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, zero filler, with the capability and mode split front-loaded and the retry constraint second. Nothing could be removed without losing information.

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 14-parameter, zero-required, open-world creation tool with no output schema, the description omits the most decision-relevant unknown: what a successful call yields (checkout URL, session ID) and how the returned session relates to yolfi_checkout_sessions_get. The mode-selection guidance is present, but an agent must open the schema to learn the required field combinations.

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% and every one of the 14 parameters carries its own explanatory text (including the paylink-vs-amount/currency exclusivity and the 'redirect is not proof of payment' warning). The description adds no parameter-level meaning beyond that, 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?

States a specific verb+resource ('Create hosted checkout') and enumerates the two supported modes: paylink-backed or standalone amount+currency. It is clear what the tool produces, though it never names the sibling it supersedes (e.g., yolfi_payments_create or yolfi_paylinks_create), so cross-tool differentiation is left to inference.

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?

'Create hosted checkout for an existing paylink or a server-approved standalone amount and currency' tells the agent which of the two modes to pick and the constraint ('server-approved') on the standalone path. The retry rule ('Reuse the same idempotencyKey for the same order on retries') is actionable guidance, but there are no explicit exclusions or pointers to the sibling tools agents might confuse this with.

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