Skip to main content
Glama

fundBalanceWithSharedPaymentToken

fundBalanceWithSharedPaymentToken: Stage adding funds to the balance by charging a Stripe Shared Payment Token the customer granted to OSIR. Use when a purchase (registerDomain, renewDomain, transferDomain, orderVps) failed for insufficient funds: that error tells you the networkId to mint against and both amounts. Mint the token for the GROSS and pass the NET as creditCents. Tokens are single-use. Requires authentication. Returns an actionId; tell the user what the card will be charged, then call executeConfirmedAction with the actionId if they approve. If this fails in any way you cannot fix by minting a fresh token, fall back to createPaymentSession and give the user the checkout URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
currencyNo3-letter ISO 4217 currency code, default USD. Must match the balance currency.
sessionKeyNoSession key (osk_...) returned by checkDeviceLoginStatus. Pass it on every call when logged in via the in-chat device flow; omit when connected via OAuth.
creditCentsYesNET amount to land in the balance, in minor units (cents). Use fundNetCents from the insufficient-funds error. The card is charged this plus the processing fee.
descriptionNoWhat the funds are for, e.g. 'Funding registration of example.com'. Lands on the customer's transaction record.
maxChargeCentsNoThe usage_limits max_amount the token was minted with, i.e. fundGrossCents. Supplying it lets OSIR reject an impossible charge without calling Stripe.
sharedPaymentTokenYesThe Stripe Shared Payment Token, 'spt_...'. Minted for the GROSS amount against the networkId from the insufficient-funds error. Single-use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: tokens are single-use, authentication is required, the call only stages an action and returns an actionId, the user should be told what the card will be charged before executing, and gross-vs-net handling is described. The annotations (readOnlyHint=false, idempotentHint=false) are consistent and extended by the two-step confirmation flow.

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

Conciseness4/5

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

A single dense paragraph that is front-loaded with the purpose before the when-to-use, gross/net, and fallback details. Every sentence carries operational weight, though the run-on structure costs a bit of readability.

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 two-step staging tool with no output schema, the description covers the return value (actionId), the required user confirmation, the follow-up call, and a fallback path. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds real semantic value by explaining the GROSS/NET split that governs sharedPaymentToken and creditCents and tying them to the insufficient-funds error fields. It goes beyond restating the schema without fully documenting every parameter (e.g. sessionKey, maxChargeCents).

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?

States a specific verb and resource ('Stage adding funds to the balance by charging a Stripe Shared Payment Token') and is clearly distinct from siblings like createPaymentSession, payInvoice, and executeConfirmedAction. An agent knows exactly what this does without opening the schema.

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?

Explicitly names the triggering condition (a purchase like registerDomain/renewDomain/transferDomain/orderVps failing for insufficient funds), the follow-up tool (executeConfirmedAction with the actionId), and the fallback (createPaymentSession with a checkout URL). When-to-use, when-not-to-use, and alternatives are all covered.

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.