Skip to main content
Glama

purchase_credits

Create a Stripe checkout session to purchase credits or subscribe to a plan. Returns a checkout URL for a person to open. An agent paying on its own (an MPP wallet) buys a credit pack with POST https://api.neume.io/v1/agents/credits/{productId} instead, its API key in X-API-Key.

Input Schema

NameRequiredDescriptionDefault
cancelUrlYesURL to redirect to if payment is cancelled
productIdYesProduct ID to purchase
successUrlYesURL to redirect to after successful payment

Output Schema

NameRequiredDescriptionDefault
checkoutUrlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare a non-read-only, open-world, non-destructive operation. The description adds the crucial behavior that this is a redirect-based, human-in-the-loop flow and warns autonomous agents away from it, which annotations cannot express. It stops short of saying what happens after the session is created (expiry, duplicate sessions) but the output schema covers the return shape.

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?

Front-loaded with the core action and return value; the alternate-endpoint guidance is dense but earns its place. Slightly awkward to parse as a single long sentence at the end, but there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With annotations covering the safety profile and an output schema covering the return, the remaining burden is usage routing, which is handled well. The one gap is that product IDs must come from a sibling listing tool, which is implied by context but not stated.

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%, so successUrl, cancelUrl, and productId are already fully documented with formats and constraints. The description only echoes productId inside the alternate endpoint template and adds no sourcing guidance (e.g., where to get product IDs from list_topup_packages or list_subscription_plans). 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?

States a specific verb and resource: 'Create a Stripe checkout session to purchase credits or subscribe to a plan.' It also notes the return value (a checkout URL) and distinguishes itself from the plan/package listing siblings by naming both purchasable outcomes. An agent can identify the tool 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 routes: this tool is for a human to open the returned URL, whereas an autonomous agent paying with an MPP wallet must use POST /v1/agents/credits/{productId} with X-API-Key. That is a clear when-to-use / when-not-to-use split naming the alternative.

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