Skip to main content
Glama

top_up_credits

Opens a top-up intent to add USDC or card credit to a workspace when a call is refused past the free allowance, returning the exact amount, chain, address, and wallet link or checkout URL to pay.

Instructions

Ask to be paid: opens a top-up intent for usd dollars. method usdc (the default) answers the exact amount to send (amount_micros USDC base units, the dollars plus a small offset that names your workspace), the receiving address, the chain and its id, the USDC contract, an EIP-681 wallet link and expires_at (24 hours). With a wallet, pay that exact amount of USDC on that chain yourself; once the transfer has its confirmations the balance is credited and a cutoff on a priced meter lifts. A different amount is not matched. Without a wallet, ask with method card and hand the checkout_url it answers to a person; card is the next rail, and an instance that has not configured it says so. get_credits lists the methods this instance offers. Moves no money. Call it when a call is refused as past the free allowance (HTTP 402, or a tool error naming the meter). Works past the cutoff. At most 20 open intents per workspace. The twin of POST /workspaces/{id}/credits/top-ups.

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": {
      "usd": "<usd>",
      "workspace_id": "<workspace_id>"
    },
    "name": "top_up_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
usdYeswhole dollars to add, 1 to 10000
methodNousdc (default): a USDC transfer on Base, which an agent with a wallet sends itself; card: a checkout link for a person
workspace_idYesyour own workspace (whoami's workspace_id)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv479.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations it discloses that no money moves, that an intent expires in 24 hours, that a different amount will not be matched, that crediting depends on transfer confirmations, and that at most 20 open intents exist per workspace. This is consistent with destructiveHint=false and idempotentHint=false (each call opens a new intent with its own expiry). The one gap is that configuration failure for the card rail is mentioned only vaguely ("an instance that has not configured it says so").

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?

It is dense and long, but front-loaded with the core action and ordered from intent creation to payment to fallback. Sentences are short and information-bearing ("Moves no money."), with only mild telegraphic crowding around the return fields.

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?

There is no output schema, so the description must describe the response, and it does: amount_micros, receiving address, chain id, USDC contract, EIP-681 link, expires_at, and checkout_url for the card path. Given a 3-parameter, non-destructive mutation, nothing essential for correct invocation 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 behavioral meaning to usd (pay the exact returned amount; a different amount is not matched) and to method (usdc is the default and is self-served with a wallet; card produces a checkout_url for a human). That goes somewhat beyond the enum labels in the schema.

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?

"Ask to be paid: opens a top-up intent for usd dollars" names a specific verb and resource, and the twin-endpoint note (POST /workspaces/{id}/credits/top-ups) pins the semantics exactly. It is clearly separable from the sibling get_credits, which is described as merely listing offered methods.

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 trigger condition: call it when a call is refused as past the free allowance (HTTP 402 or a tool error naming the meter), with the note that it works past that cutoff. It also routes between its own modes (usdc with a wallet, card for a person) and points to get_credits for discovering available methods.

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

Deploy Server

Other Tools