Skip to main content
Glama

Connect a payment provider

configure_payments
Idempotent

Let a store take online payments. Either connect the merchant's OWN Razorpay, Stripe or PayPal account (provider + credentials, exactly as the merchant pasted them — ask for them, never invent or reuse keys), or pass use_test_payments: true ("demo payments", Razorpay or provider: "stripe") to take TEST payments on our test account so the user can try checkout before they have keys (no real money moves; tell them so). A site in demo mode (or on the merchant's own sandbox keys) can be published: every page shows a "test mode" bar and no real money is taken until live keys are connected. Only one provider is active at a time: connecting one switches the others off. Secrets are stored and never returned (masked to the last 4 characters) — do not repeat them in chat. For real keys the response carries the webhook URL and events the merchant must register in their provider dashboard so paid orders are confirmed. remove: true disconnects provider. A store with no provider can still sell with configure_cash_on_delivery.

Input Schema

NameRequiredDescriptionDefault
removeNotrue = disconnect `provider` and delete its keys
site_idYesThe site, from list_sites
currencyNoCurrency this gateway charges in. Omit to follow the store currency (recommended).
providerNoThe merchant's own gateway, with `credentials`
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
credentialsNoThe keys exactly as the merchant gave them. Stripe: publishableKey + secretKey. Razorpay: keyId + keySecret. PayPal: clientId + clientSecret + mode. Never repeat them back to the user.
business_nameNoName shown on the checkout page
use_test_paymentsNotrue = demo payments: take TEST payments on our own test account, no merchant keys needed (no real money moves). Runs on the gateway named in provider ("razorpay" or "stripe"; PayPal has no demo mode); without one, Razorpay for an INR store and Stripe otherwise, so the owner tests the gateway they will actually use. Ignores credentials. The site can still be published to try the live store; its pages then show a "test mode" bar until real keys are connected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / user_goal
      Added value: +{
      +  "description": "Optional: the user's goal behind this call, in one short sentence of plain words (e.g. \"add a page so customers can book tables\"). No names, emails or other personal details.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: secrets are stored, masked to the last 4 characters and must never be repeated in chat; the response carries the `webhook` URL and events the merchant must register; demo-mode sites show a "test mode" bar when published and take no real money. It also warns never to invent or reuse keys. Only mild tension: `remove: true` deletes keys while destructiveHint=false, but that is a config disconnect rather than data destruction, so it is not a contradiction.

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?

Purpose is front-loaded and every paragraph carries operational weight, but the single dense block with nested parentheticals ("(demo payments", "no real money moves; tell them so") is longer than needed and repeats test-mode wording that also appears in the schema.

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 8-parameter, nested-object mutation with no output schema, the description covers the return value (webhook URL and events), side effects (test-mode bar, other providers switched off), secret handling, and the multi-provider constraint. Nothing an agent needs in order to call this 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, and the description still adds real meaning: credentials must be the merchant's keys exactly as pasted, `use_test_payments` ignores `credentials`, and the default demo gateway is Razorpay for INR stores and Stripe otherwise. It does not re-explain per-key formats, but the schema already does that thoroughly.

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?

"Let a store take online payments" states a concrete outcome, and the description then spells out both operating modes (merchant's own gateway vs. demo/test payments) plus the disconnect action via `remove: true`. It is clearly distinguishable from siblings like configure_cash_on_delivery, which is explicitly named as the fallback when no provider is connected.

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?

Explicit routing: use `provider` + `credentials` when the merchant has keys, use `use_test_payments: true` when they don't, and `remove: true` to disconnect. It also states the cross-tool rule (only one provider active at a time) and points to configure_cash_on_delivery for stores that want no gateway.

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