Skip to main content
Glama

Buy Neumann credits with your saved card

buy_credits
Destructive

Buys Neumann credits by charging the payment card already saved on your account. Credits pay for runs once the free runs for the day are used up, or for a model too large to run free. Use this when an account is low on credits and the user has agreed to the purchase; to see the balance and the live price first, call check_account_and_credits. No saved card is needed to call it: if none is saved yet, it buys nothing and charges nothing: it returns payment_status checkout_required and a checkout_url, which the user opens in a browser to save a card before you call this tool again. It returns the credits bought, the new balance, the payment status and, when a card is needed, the checkout_url. It needs a Neumann account: send your key, or your signed-in token, in the Authorization header as a Bearer credential. No Neumann tool takes an api_key argument. Buying credits needs the neumann:billing scope when you are signed in rather than using a key. Cost: charges the payment card saved on your account for each credit, currently $0.50 per credit (check_account_and_credits shows the live price). It needs an account, and credits are what a run costs once your free runs for the day are gone -- 1 credit for a small run or 5 for a large one.

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": {
      "credits": "<credits>"
    },
    "name": "buy_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
creditsYesHow many credits to buy. At least 1.

Output Schema

NameRequiredDescriptionDefault
billingNoWho you are and what this call cost: principal, auth source, credits debited and balance, or the anonymous allowance left today.
new_balanceYesCredit balance after the purchase.
checkout_urlNoSet only when payment_status is checkout_required: a link for the user to open in a browser and save a card. Call buy_credits again afterwards to complete the purchase. Otherwise null.
payment_statusYesThe card payment's status, for example succeeded. checkout_required means no card was saved, so nothing was bought or charged; open checkout_url to save one.
credits_purchasedYesCredits added.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedOutput schema / $defs / BillingInfo / properties / anonymous_runs_remaining_today / description
      Previous value: -"Free runs left today, after this call. Null with an account."New value: +"Free runs left today for a caller without an account, after this call. Null with an account -- see free_runs_remaining_today instead."
    • changedOutput schema / $defs / BillingInfo / properties / charged_to / description
      Previous value: -"What paid for this call: anonymous_allowance (one free daily run), credits, or none (free)."New value: +"What paid for this call: anonymous_allowance (one of the free daily runs for callers without an account), free_daily_run (one of a signed-in account's free daily runs), credits (the account's credit balance), or none (the call is free)."
    • changedOutput schema / $defs / BillingInfo / properties / free_run_limits / description
      Previous value: -"The free signed-in tier's bounds. Null unless the account signed in with Kromatic."New value: +"The size a run must be within to use one of this account's free daily runs. Null unless the account signed in with Kromatic."
    • changedOutput schema / $defs / BillingInfo / properties / free_runs_remaining_today / description
      Previous value: -"Free signed-in runs left in the current UTC day, counting this call. Null unless the account signed in with Kromatic."New value: +"Free runs left today on this account, after this call. Null unless the account signed in with Kromatic: an account created with POST https://neumann.kromatic.com/api/v1/accounts has no free daily runs."
    • changedOutput schema / $defs / BillingInfo / properties / free_runs_reset_at / description
      Previous value: -"ISO-8601 instant the free signed-in runs next refill (the next UTC midnight). Null unless the account signed in with Kromatic."New value: +"When this account's free daily runs refill (the next UTC midnight), as an ISO-8601 time. Null unless the account signed in with Kromatic."
  2. Changed8 schema fields changed
    • removedInput schema / properties / api_key
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Your Neumann API key. Required unless your connection is signed in with billing permission (the neumann:billing scope). Get one by creating an account (POST https://neumann.kromatic.com/api/v1/accounts, which returns the key once); setup docs: https://kromatic.com/mcp/neumann.",
      -  "title": "Api Key"
      -}
    • changedOutput schema / $defs / BillingInfo / properties / auth_source / description
      Previous value: -"How you were identified: bearer (a signed-in connection token), api_key (the api_key argument) or anonymous."New value: +"How you were identified: bearer (a credential sent in the Authorization: Bearer header) or anonymous."
    • changedOutput schema / $defs / BillingInfo / properties / auth_source / enum
      Previous value: -[
      -  "bearer",
      -  "api_key",
      -  "anonymous"
      -]New value: +[
      +  "bearer",
      +  "anonymous"
      +]
    • changedOutput schema / $defs / BillingInfo / properties / charged_to / enum
      Previous value: -[
      -  "anonymous_allowance",
      -  "credits",
      -  "none"
      -]New value: +[
      +  "anonymous_allowance",
      +  "free_daily_run",
      +  "credits",
      +  "none"
      +]
    • addedOutput schema / $defs / BillingInfo / properties / free_run_limits
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/SignedInLimits"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The free signed-in tier's bounds. Null unless the account signed in with Kromatic."
      +}
    • addedOutput schema / $defs / BillingInfo / properties / free_runs_remaining_today
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Free signed-in runs left in the current UTC day, counting this call. Null unless the account signed in with Kromatic.",
      +  "title": "Free Runs Remaining Today"
      +}
    • addedOutput schema / $defs / BillingInfo / properties / free_runs_reset_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "ISO-8601 instant the free signed-in runs next refill (the next UTC midnight). Null unless the account signed in with Kromatic.",
      +  "title": "Free Runs Reset At"
      +}
    • addedOutput schema / $defs / SignedInLimits
      Added value: +{
      +  "description": "The free signed-in tier's bounds (neumann#334), rendered from ``Settings``.",
      +  "properties": {
      +    "max_nodes": {
      +      "description": "Maximum nodes in a free run's graph.",
      +      "title": "Max Nodes",
      +      "type": "integer"
      +    },
      +    "max_trials": {
      +      "description": "Maximum trials in a free run.",
      +      "title": "Max Trials",
      +      "type": "integer"
      +    },
      +    "runs_per_day": {
      +      "description": "Free runs per UTC calendar day.",
      +      "title": "Runs Per Day",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "runs_per_day",
      +    "max_trials",
      +    "max_nodes"
      +  ],
      +  "title": "SignedInLimits",
      +  "type": "object"
      +}
  3. Changed24 schema fields changed
    • removedInput schema / description
      Removed value: -"Arguments for ``buy_credits`` (neumann#192; mirrors fermi's schema).\n\nAuthentication is required (unlike the free tools above): an anonymous\ncaller gets an ``authentication_required`` tool error. No price literal\nhere by design — see GET /billing/pricing for the current per-credit cost."
    • changedInput schema / properties / api_key / description
      Previous value: -"Your API key from POST /api/v1/accounts. Required unless you are authenticated via an Authorization: Bearer token."New value: +"Your Neumann API key. Required unless your connection is signed in with billing permission (the neumann:billing scope). Get one by creating an account (POST https://neumann.kromatic.com/api/v1/accounts, which returns the key once); setup docs: https://kromatic.com/mcp/neumann."
    • changedInput schema / properties / credits / description
      Previous value: -"Number of credits to purchase."New value: +"How many credits to buy. At least 1."
    • addedInput schema / properties / credits / examples
      Added value: +[
      +  100
      +]
    • changedOutput schema / $defs / AnonymousLimits / description
      Previous value: -"The anonymous tier's hard bounds, rendered from ``Settings``."New value: +"The limits that apply without an account."
    • changedOutput schema / $defs / AnonymousLimits / properties / max_nodes / description
      Previous value: -"Maximum nodes in an anonymous graph."New value: +"Most nodes (inputs plus formula nodes) allowed without an account."
    • changedOutput schema / $defs / AnonymousLimits / properties / max_trials / description
      Previous value: -"Maximum trials in a single anonymous run."New value: +"Most trials allowed in one run without an account."
    • changedOutput schema / $defs / AnonymousLimits / properties / runs_per_day / description
      Previous value: -"Simulation runs per UTC calendar day."New value: +"Free runs per UTC day."
    • changedOutput schema / $defs / BillingInfo / description
      Previous value: -"Who the caller is and what this call cost them (neumann#278).\n\nPresent on every tool result. Read ``charged_to`` for the verdict and\n``credits_debited`` / ``anonymous_runs_remaining_today`` for the amount."New value: +"Who you are and what this call cost. Present on every result. charged_to says what paid; credits_debited and anonymous_runs_remaining_today say how much."
    • changedOutput schema / $defs / BillingInfo / properties / account_id / description
      Previous value: -"The resolved account id, or null when anonymous."New value: +"Your account id, or null without an account."
    • changedOutput schema / $defs / BillingInfo / properties / account_status / description
      Previous value: -"'matched' when an existing account was resolved, 'created' when this call auto-created one (OAuth first call). Null when anonymous."New value: +"matched for an existing account, created when this call created one on first sign-in. Null without an account."
    • changedOutput schema / $defs / BillingInfo / properties / anonymous_allowance_resets_at / description
      Previous value: -"ISO-8601 instant the anonymous allowance next refills (the next UTC midnight). Null when the caller is an account."New value: +"When free runs refill (next UTC midnight), as an ISO-8601 time. Null with an account."
    • changedOutput schema / $defs / BillingInfo / properties / anonymous_limits / description
      Previous value: -"The anonymous tier's bounds. Null when the caller is an account."New value: +"The no-account limits. Null with an account."
    • changedOutput schema / $defs / BillingInfo / properties / anonymous_runs_remaining_today / description
      Previous value: -"Free anonymous runs left in the current UTC day, counting this call. Null when the caller is an account (the allowance does not apply)."New value: +"Free runs left today, after this call. Null with an account."
    • changedOutput schema / $defs / BillingInfo / properties / auth_source / description
      Previous value: -"How the caller was identified: 'bearer' (Authorization: Bearer nmn_oat_/nmn_pat_), 'api_key' (the api_key tool argument), or 'anonymous' (no credential)."New value: +"How you were identified: bearer (a signed-in connection token), api_key (the api_key argument) or anonymous."
    • changedOutput schema / $defs / BillingInfo / properties / charged_to / description
      Previous value: -"What this call was billed against: 'anonymous_allowance' (one free daily run), 'credits' (the account ledger), or 'none' (free)."New value: +"What paid for this call: anonymous_allowance (one free daily run), credits, or none (free)."
    • changedOutput schema / $defs / BillingInfo / properties / credit_balance / description
      Previous value: -"The account's credit balance AFTER this call. Null when anonymous."New value: +"Your credit balance after this call. Null without an account."
    • changedOutput schema / $defs / BillingInfo / properties / credits_debited / description
      Previous value: -"Credits this call debited (0 for a free call)."New value: +"Credits this call used (0 when free)."
    • changedOutput schema / $defs / BillingInfo / properties / principal / description
      Previous value: -"'account' when a credential resolved, else 'anonymous'."New value: +"account when an API key or signed-in connection was recognized, otherwise anonymous."
    • changedOutput schema / description
      Previous value: -"Result of ``buy_credits``."New value: +"Result of the purchase."
    • addedOutput schema / properties / checkout_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Set only when payment_status is checkout_required: a link for the user to open in a browser and save a card. Call buy_credits again afterwards to complete the purchase. Otherwise null.",
      +  "title": "Checkout Url"
      +}
    • addedOutput schema / properties / credits_purchased / description
      Added value: +"Credits added."
    • addedOutput schema / properties / new_balance / description
      Added value: +"Credit balance after the purchase."
    • addedOutput schema / properties / payment_status / description
      Added value: +"The card payment's status, for example succeeded. checkout_required means no card was saved, so nothing was bought or charged; open checkout_url to save one."
  4. Changed2 schema fields changed
    • addedOutput schema / $defs
      Added value: +{
      +  "AnonymousLimits": {
      +    "description": "The anonymous tier's hard bounds, rendered from ``Settings``.",
      +    "properties": {
      +      "max_nodes": {
      +        "description": "Maximum nodes in an anonymous graph.",
      +        "title": "Max Nodes",
      +        "type": "integer"
      +      },
      +      "max_trials": {
      +        "description": "Maximum trials in a single anonymous run.",
      +        "title": "Max Trials",
      +        "type": "integer"
      +      },
      +      "runs_per_day": {
      +        "description": "Simulation runs per UTC calendar day.",
      +        "title": "Runs Per Day",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "runs_per_day",
      +      "max_trials",
      +      "max_nodes"
      +    ],
      +    "title": "AnonymousLimits",
      +    "type": "object"
      +  },
      +  "BillingInfo": {
      +    "description": "Who the caller is and what this call cost them (neumann#278).\n\nPresent on every tool result. Read ``charged_to`` for the verdict and\n``credits_debited`` / ``anonymous_runs_remaining_today`` for the amount.",
      +    "properties": {
      +      "account_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The resolved account id, or null when anonymous.",
      +        "title": "Account Id"
      +      },
      +      "account_status": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "matched",
      +              "created"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "'matched' when an existing account was resolved, 'created' when this call auto-created one (OAuth first call). Null when anonymous.",
      +        "title": "Account Status"
      +      },
      +      "anonymous_allowance_resets_at": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "ISO-8601 instant the anonymous allowance next refills (the next UTC midnight). Null when the caller is an account.",
      +        "title": "Anonymous Allowance Resets At"
      +      },
      +      "anonymous_limits": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/AnonymousLimits"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The anonymous tier's bounds. Null when the caller is an account."
      +      },
      +      "anonymous_runs_remaining_today": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Free anonymous runs left in the current UTC day, counting this call. Null when the caller is an account (the allowance does not apply).",
      +        "title": "Anonymous Runs Remaining Today"
      +      },
      +      "auth_source": {
      +        "description": "How the caller was identified: 'bearer' (Authorization: Bearer nmn_oat_/nmn_pat_), 'api_key' (the api_key tool argument), or 'anonymous' (no credential).",
      +        "enum": [
      +          "bearer",
      +          "api_key",
      +          "anonymous"
      +        ],
      +        "title": "Auth Source",
      +        "type": "string"
      +      },
      +      "charged_to": {
      +        "description": "What this call was billed against: 'anonymous_allowance' (one free daily run), 'credits' (the account ledger), or 'none' (free).",
      +        "enum": [
      +          "anonymous_allowance",
      +          "credits",
      +          "none"
      +        ],
      +        "title": "Charged To",
      +        "type": "string"
      +      },
      +      "credit_balance": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The account's credit balance AFTER this call. Null when anonymous.",
      +        "title": "Credit Balance"
      +      },
      +      "credits_debited": {
      +        "default": 0,
      +        "description": "Credits this call debited (0 for a free call).",
      +        "title": "Credits Debited",
      +        "type": "integer"
      +      },
      +      "principal": {
      +        "description": "'account' when a credential resolved, else 'anonymous'.",
      +        "enum": [
      +          "anonymous",
      +          "account"
      +        ],
      +        "title": "Principal",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "principal",
      +      "auth_source",
      +      "charged_to"
      +    ],
      +    "title": "BillingInfo",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / billing
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/BillingInfo"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Who you are and what this call cost: principal, auth source, credits debited and balance, or the anonymous allowance left today."
      +}
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only flag this as a non-idempotent, destructive, open-world write; the description supplies the behavior that matters: the actual charge ($0.50 per credit), the conditional no-op path (payment_status checkout_required plus checkout_url, nothing charged), the response fields, and the auth requirements (Bearer key or signed-in token, neumann:billing scope). No Neumann tool taking an api_key argument is also called out, preventing a common wrong invocation.

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?

The key facts are front-loaded, but the text loops: the account requirement is stated twice ("It needs a Neumann account: send your key..." then "It needs an account, and credits are what a run costs..."), the credits-to-runs explanation appears twice, and the return fields are spelled out despite an output schema existing.

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 one-param billing mutation with an output schema, everything an agent needs is present: cost model, auth and scope, the no-card fallback, and the confirmation that a purchase occurs per credit. Nothing required to invoke it correctly 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% and there is a single param, so the baseline is 3; the description goes beyond it by pricing each credit at $0.50 and mapping credit consumption to run size (1 credit small, 5 large), which lets an agent sanity-check the value the user should pass.

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 plus the exact mechanism: "Buys Neumann credits by charging the payment card already saved on your account." It also distinguishes the tool from its nearest sibling by name (check_account_and_credits), so an agent can select it without opening either 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?

Gives an explicit trigger condition ("when an account is low on credits and the user has agreed to the purchase") and names the alternative to call first for balance and live price. It also covers the case where a card is not yet saved and tells the agent to re-call after the user opens checkout_url, which is exactly the branching an agent needs.

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