Skip to main content
Glama

get_credits

Read-onlyIdempotent

Retrieve a workspace's prepaid credit balance, payment methods, top-up intents, and recent ledger so you can check allowance and resolve overage cutoffs.

Instructions

The workspace's prepaid credits: balance_micros (USD micros, one USDC base unit each; below zero, overage went unpaid and the priced meters are cut off until a deposit covers it), whether this instance takes payment (enabled) and by which methods (usdc now; card next), the chain, receiving address and USDC contract, the overage price per meter, the open top-up intents and the recent ledger (deposits, charges, grants). Works past the allowance cutoff. The twin of GET /workspaces/{id}/credits.

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

Input Schema

NameRequiredDescriptionDefault
workspace_idYesyour own workspace (whoami's workspace_id)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv479.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotent, so safety is covered; the description goes further by explaining that a negative balance means unpaid overage and that priced meters are cut off until a deposit covers it, plus that payment is USDC-only today with card planned. These are real behavioral semantics an agent cannot get from the annotations. It lacks any note on response shape or size, but with no output schema the field enumeration partially compensates.

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 definition is front-loaded on the resource but collapses into one very long run-on clause with a nested parenthetical explaining micros, which is hard to parse. Some content is redundant ("USD micros, one USDC base unit each" says the same thing twice), and "The twin of GET /workspaces/{id}/credits" is endpoint trivia rather than agent-facing guidance.

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 no output schema, the description must carry return-value documentation, and it largely does by listing every returned field group with semantics for the most consequential one (balance_micros). Annotations cover the read-only safety profile. The only gap is that it does not characterize the shape or volume of the ledger/top-up intent lists.

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

Parameters3/5

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

There is a single parameter with 100% schema description coverage, and the schema already explains workspace_id as "your own workspace (whoami's workspace_id)". The description never mentions the parameter at all, so it adds no meaning beyond the schema. Baseline 3 applies when the schema does the full job.

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 specific resource (the workspace's prepaid credits) and enumerates exactly what it exposes: balance_micros, payment enablement and methods, chain, receiving address, USDC contract, overage price, open top-up intents, and recent ledger. It is not tautological. It stops short of explicitly distinguishing itself from the sibling mutation tool top_up_credits, so an agent must infer the read/write split from the name alone.

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?

"Works past the allowance cutoff" is a genuinely useful condition telling the agent this call succeeds even when other priced operations are blocked. However, there is no explicit guidance on when to call this versus top_up_credits, nor a statement that this is the pre-check for topping up. Usage is implied rather than stated.

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