Skip to main content
Glama

buy_credits

Purchase credits for edge library and AI research. Pay via Stripe Checkout card link or send USDC on Base and confirm payment for instant credit.

Instructions

Buy credits for the edge library and AI research. Default $5 minimum. Free — no credits consumed to call this.

TWO PAYMENT METHODS: card (default): Returns a Stripe Checkout link for your user to click and pay. After payment, call check_balance to confirm credits were added. crypto: USDC on Base. Fully autonomous — no human needed. Three steps: 1. buy_credits(payment_method='crypto') → returns deposit address + payment_intent_id 2. Send USDC to the deposit address (use your wallet tool) 3. buy_credits(payment_intent_id='pi_...') → confirms payment, credits added instantly If you have wallet access, this is the fastest path — fully machine-to-machine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amount_centsNoAmount in cents (default 500 = $5.00). Minimum $5.
payment_methodNoPayment method: 'card' (default, Stripe Checkout) or 'crypto' (USDC on Base).card
payment_intent_idNoFor crypto: Stripe PaymentIntent ID from a previous buy_credits call. Pass after sending USDC to confirm.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
depositNoUSDC deposit address for crypto payment
checkout_urlNoStripe Checkout link for card payment
current_balance_centsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "checkout_url": {
      +      "description": "Stripe Checkout link for card payment",
      +      "type": "string"
      +    },
      +    "current_balance_cents": {
      +      "type": "integer"
      +    },
      +    "deposit": {
      +      "description": "USDC deposit address for crypto payment",
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.3.4
    • changedInput schema / properties / payment_intent_id / description
      Previous value: -"Stripe PaymentIntent ID from a previous buy_credits call. Pass this after sending USDC to confirm payment and receive credits."New value: +"For crypto: Stripe PaymentIntent ID from a previous buy_credits call. Pass after sending USDC to confirm."
    • addedInput schema / properties / payment_method
      Added value: +{
      +  "default": "card",
      +  "description": "Payment method: 'card' (default, Stripe Checkout) or 'crypto' (USDC on Base).",
      +  "type": "string"
      +}
  3. First observedv1.0.0

TDQS

A5/5.0
Behavior5/5

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

Discloses that the tool is free (no credits consumed), returns a Stripe Checkout link for card, and provides a deposit address and payment_intent_id for crypto. It also explains the two-step confirmation behavior, offering context beyond the annotations.

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?

The description is well-organized with clear headings and numbered steps, making it scannable. Every sentence provides actionable information without waste.

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?

Covers the full payment lifecycle, including fallback to check_balance, exact call sequence for crypto, and the condition of instant credit addition after confirmation. Given the complexity of a payment tool, this is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes all three parameters, but the description adds operational meaning by explaining the two-phase crypto flow (first with payment_method='crypto', then with payment_intent_id to confirm) and the default amount_cents. This makes the parameters' roles clear in context.

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 description clearly states the tool 'Buys credits for the edge library and AI research' and details the two payment methods. It also distinguishes itself from the sibling check_balance by referencing it for post-payment confirmation.

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?

Provides explicit when-to-use guidance: card for user-mediated Stripe payment, crypto for autonomous machine-to-machine flow when wallet access is available. It also instructs the agent to call check_balance after card payment, naming a sibling alternative.

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