Skip to main content
Glama

Mint API Key or Top Up Prepaid Credits

topup_credits

Deposit prepaid credits into an API key or mint a new one ($1-$500 USD) when credits run out or a new session needs credentials. Returns updated balance and key details.

Instructions

Deposit prepaid credits into an existing API key or mint a new key ($1.00 USD minimum, $500.00 max). State-mutating operation that creates or updates database credentials. Requires no prior authentication. Pass 'api_key' to top up an existing key, or omit 'api_key' to mint a fresh key. Returns generated or updated key details and balance in USD. WHEN TO USE: Use when an existing key has exhausted credits, or when a new agent session requires dedicated credentials. WHEN NOT TO USE: Do not use solely to inspect an existing balance without depositing funds; use 'check_balance' instead. ALTERNATIVES: Use 'check_balance' for read-only balance verification without adding credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoOptional existing 'fc_live_...' key to top up. If omitted, mints and returns a fresh API key.
amount_usdYesAmount to deposit in USD (minimum 1.00, maximum 500.00, e.g. 5.00).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoThe newly minted API key (only present when creating a new key)
messageYesStatus confirmation message
successNoWhether the credit top-up succeeded
balance_usdYesUpdated credit balance in USD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.1
    • changedInput schema / properties / amount_usd / description
      Previous value: -"Amount in USD (minimum $1.00)"New value: +"Amount to deposit in USD (minimum 1.00, maximum 500.00, e.g. 5.00)."
    • changedInput schema / properties / api_key / description
      Previous value: -"Optional existing key to top up. If omitted, mints a new key."New value: +"Optional existing 'fc_live_...' key to top up. If omitted, mints and returns a fresh API key."
    • addedInput schema / required
      Added value: +[
      +  "amount_usd"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "balance_usd": {
      +      "description": "Updated credit balance in USD",
      +      "type": "string"
      +    },
      +    "key": {
      +      "description": "The newly minted API key (only present when creating a new key)",
      +      "type": "string"
      +    },
      +    "message": {
      +      "description": "Status confirmation message",
      +      "type": "string"
      +    },
      +    "success": {
      +      "description": "Whether the credit top-up succeeded",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "message",
      +    "balance_usd"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=false, but the description adds meaningful context beyond them: it discloses the mutation's effect (creates or updates database credentials), that no prior authentication is required, the $1–$500 bounds, and the returned key/balance shape. It does not restate non-idempotency explicitly, a minor gap.

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, then scoped by labeled sections that make scanning easy. The only waste is mild overlap between the WHEN NOT TO USE and ALTERNATIVES clauses, both citing check_balance.

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 two-parameter mutation with annotations and an output schema, the description covers everything an agent needs: mode selection, limits, auth requirement, and mutation effect. Return-value detail is not required since an output schema exists.

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 real behavioral meaning to the optional parameter: passing 'api_key' tops up, omitting it mints a fresh key. That conditional semantics is the crux of correct invocation and is not spelled out as clearly in the schema alone.

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+resource with dual scope: 'Deposit prepaid credits into an existing API key or mint a new key.' It clearly distinguishes the two modes of operation and names a sibling (check_balance) so an agent can route correctly without opening a 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?

Explicit WHEN TO USE (exhausted credits, new agent session), WHEN NOT TO USE (balance inspection only), and ALTERNATIVES (check_balance) sections leave nothing to inference. The condition selecting the alternative is stated directly.

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