Skip to main content
Glama

Add payments

add_payments
Idempotent

Let a node or python app on spawnpoint take payments into its owner's own Stripe account. Call it after the app is deployed, with its project_id. It makes the app's Stripe webhook path (default /stripe/webhook) reachable by Stripe and returns connect_url: give that link to the user and say they will approve spawnpoint in their own Stripe account there, which takes about a minute. Never ask the user for a Stripe key. Once they connect, the app restarts with STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY, STRIPE_WEBHOOK_SECRET, SPAWNPOINT_STRIPE_API_HOST, SPAWNPOINT_PAYMENTS_MODE, and SPAWNPOINT_STRIPE_WEBHOOK_PATH. Write the app so: create the Stripe client with STRIPE_SECRET_KEY and the host in SPAWNPOINT_STRIPE_API_HOST (Node: new Stripe(process.env.STRIPE_SECRET_KEY, {host: process.env.SPAWNPOINT_STRIPE_API_HOST}); Python: stripe.api_base = "https://" + os.environ["SPAWNPOINT_STRIPE_API_HOST"]); sell with a Stripe Checkout Session and price_data, so nothing has to be made in Stripe first; mount a POST handler at SPAWNPOINT_STRIPE_WEBHOOK_PATH that verifies the signature over the raw body with STRIPE_WEBHOOK_SECRET and fulfils each order once there, never on the success page: on checkout.session.completed when payment_status is paid, and on checkout.session.async_payment_succeeded; start without the variables and say payments are not set up yet instead of crashing. The app starts in test mode (card 4242 4242 4242 4242); only the owner switches it to real payments, in the console. Calling it again returns the current status (needs_owner, ready, disconnected), so it doubles as a status check; after handing over connect_url, wait for the owner instead of calling it in a loop. A static site is refused: it has no server to hold the key. Refused while the project has STRIPE_* variables the user set by hand: unset them first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>"
    },
    "name": "add_payments"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idYesthe id of the project
webhook_pathNothe exact path of the app's Stripe webhook route; default /stripe/webhook. Pass it only when the app already handles Stripe's events at another path

Output Schema

NameRequiredDescriptionDefault
envNo
modeNo
noteYes
statusYes
project_idYes
connect_urlNo
webhook_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare mutation, open-world, idempotency and non-destructiveness, but the description goes far past them: it discloses the returned connect_url and its ~1-minute owner approval flow, env-var injection on restart, test-mode default with 4242 card, the three status values (needs_owner, ready, disconnected), and the two refusal conditions. That is substantial behavior the schema and annotations do not carry.

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

Conciseness3/5

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

Purpose, return value and refusal conditions are front-loaded, which is good. However, the body includes long implementation snippets (Node and Python Stripe client construction, webhook signature handling) that are app-authoring advice rather than tool-invocation guidance, making the block dense and hard to scan for an agent deciding how to call it.

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 mutating, stateful, multi-step tool, the description covers the call sequence, what is returned, the hand-off to the owner, what the agent must do to the app afterwards, and the failure/refusal cases. Even though an output schema exists, the status-value semantics and the retry policy are spelled out, leaving nothing an agent needs missing.

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 100% and the schema already documents both project_id and webhook_path including its default and when to pass it, so the description mostly restates that. It adds only the deployment timing for project_id and the implicit linkage that webhook_path must match a real handler the agent mounts. Baseline 3 is appropriate.

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 opening states a specific verb and resource: letting a Node/Python app on spawnpoint take payments into the owner's own Stripe account, and immediately contrasts with what it cannot do (static sites are refused). An agent can distinguish it from add_custom_domain, set_env, or deploy_project purely from the text.

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 when-to-use ('Call it after the app is deployed, with its project_id'), explicit when-not ('A static site is refused', 'Refused while the project has STRIPE_* variables the user set by hand: unset them first'), and explicit anti-pattern ('after handing over connect_url, wait for the owner instead of calling it in a loop'). It also names the constraint 'Never ask the user for a Stripe key', which routes the agent away from a plausible wrong action.

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.