Skip to main content
Glama

Get credit balance

get_credits
Read-onlyIdempotent

Use only the account's existing entitlements: when work is unavailable, explain the limit without offering purchases, upgrades, subscriptions or checkout links. Read who pays for a press: the user's own vendor keys (fal, Replicate…) in their payer order, each with its state and, for Runware and Siray, what is left; then the house's free allowance; then credits. Also the plan and account-wide AI requests per minute. A press a key or the allowance covers costs no credits. AI requests share the rate limit across the app and agents; on RATE_LIMITED, wait retry_after_seconds before retrying.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
planYes
payersYes
app_urlYes
messageYes
allowanceYes
available_creditsYes
ai_requests_per_minuteYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / payers
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "keys": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "balance": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "amount_cents": {
      +                        "type": "number"
      +                      },
      +                      "currency": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "amount_cents",
      +                      "currency"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "models": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "audio": {
      +                    "type": "number"
      +                  },
      +                  "image": {
      +                    "type": "number"
      +                  },
      +                  "video": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "image",
      +                  "video",
      +                  "audio"
      +                ],
      +                "type": "object"
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "out_of_funds_since": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "pays_by_default": {
      +                "type": "boolean"
      +              },
      +              "retry_at": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "status": {
      +                "enum": [
      +                  "active",
      +                  "rejected",
      +                  "out_of_funds"
      +                ],
      +                "type": "string"
      +              },
      +              "vendor": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "vendor",
      +              "name",
      +              "status",
      +              "out_of_funds_since",
      +              "retry_at",
      +              "balance",
      +              "pays_by_default",
      +              "models"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "order": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "order",
      +        "keys"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "available_credits",
      -  "plan",
      -  "ai_requests_per_minute",
      -  "app_url",
      -  "allowance",
      -  "message"
      -]New value: +[
      +  "available_credits",
      +  "plan",
      +  "ai_requests_per_minute",
      +  "app_url",
      +  "allowance",
      +  "payers",
      +  "message"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / properties / allowance / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "eligible": {
      -        "type": "boolean"
      -      },
      -      "items": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "key": {
      -              "type": "string"
      -            },
      -            "kind": {
      -              "type": "string"
      -            },
      -            "model_id": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "remaining": {
      -              "type": "number"
      -            },
      -            "units": {
      -              "type": "number"
      -            },
      -            "used": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "key",
      -            "kind",
      -            "model_id",
      -            "units",
      -            "used",
      -            "remaining"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "reason": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "resets_at": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "eligible",
      -      "reason",
      -      "resets_at",
      -      "items"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "eligible": {
      +        "type": "boolean"
      +      },
      +      "items": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "included": {
      +              "type": "boolean"
      +            },
      +            "key": {
      +              "type": "string"
      +            },
      +            "kind": {
      +              "type": "string"
      +            },
      +            "model_id": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "remaining": {
      +              "type": "number"
      +            },
      +            "units": {
      +              "type": "number"
      +            },
      +            "used": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "key",
      +            "kind",
      +            "model_id",
      +            "units",
      +            "used",
      +            "remaining",
      +            "included"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "reason": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "resets_at": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "eligible",
      +      "reason",
      +      "resets_at",
      +      "items"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. Beyond that the description discloses genuinely useful behavior: rate limits are shared across app and agents, RATE_LIMITED responses carry retry_after_seconds, and a key or allowance covering a press means no credits are deducted. It doesn't state whether an empty/missing allowance path returns an error.

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 front-loaded with the constraint and then the resolution order, and every sentence carries information. The phrasing is dense and idiomatic to the point of being hard to parse ('Read who pays for a press', 'A press a key or the allowance covers'), which costs it a point.

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 an output schema present the description doesn't need to enumerate return fields, and the annotations cover safety. The remaining gap is comparative scope — it doesn't clarify how this differs from get_usage or get_account_context — but for a zero-param read tool it is otherwise sufficient to call correctly.

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?

There are zero input parameters, so the baseline is 4. The description adds no parameter detail because none is needed, and the ordering of payer sources it describes is effectively context for interpreting the response rather than parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete resource set: the payer order (user vendor keys with their state, house free allowance, credits), the plan, and the account-wide AI request rate limit. That is specific enough for an agent to distinguish it from siblings like get_usage or get_account_context, though it never names those siblings to draw the contrast explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a policy constraint ('use only the account's existing entitlements... explain the limit without offering purchases') and a retry rule on RATE_LIMITED, which is real usage guidance. However, it never says when to call this instead of get_usage, get_account_context, or quote_generation, so the routing decision against alternatives is left inferred.

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