Skip to main content
Glama

Nevermined Catalog

Get spending budget

get_budget

Read the spending budget pay_service spends from: its cap, what has been spent, what remains, how many payments were made (and the limit, if any), and when it expires. Reading costs nothing and charges nothing. Use it whenever the human asks how much is left, or before a run of paid calls. Money is in CENTS: capCents is whole cents; spentCents and remainingCents can carry up to four decimals because the budget is charged per call at 1/10,000 of a cent (e.g. "1.632" = 1.632¢), and spentCents + remainingCents = capCents while the budget is within its cap. Tell the human message as it stands and never substitute a figure of your own: the budget includes routing fees and rounding, so adding up your calls will not match it. With no delegationId it reads the budget pay_service would use; that only includes budgets that can still pay, so {"status":"no_active_delegation"} also covers a budget that ran out or expired — pass the delegationId from an earlier pay_service result to read that one anyway. Requires your Nevermined API key on the Authorization header.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delegationIdNoA specific delegation to read (every paid pay_service result carries one). Omit it to read the budget pay_service spends by default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: read-only ('costs nothing and charges nothing'), auth requirement (Nevermined API key on Authorization), and the non-obvious edge case that no_active_delegation also covers exhausted/expired budgets. It further warns that returned figures include routing fees and rounding and must be relayed verbatim.

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 purpose and safety facts, and virtually every clause earns its place. It is dense and long, with the cents/routing-fee caveat bundled into one heavy run of clauses, but no filler sentences.

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?

No output schema exists, but the description names the return fields (capCents, spentCents, remainingCents, message), states the unit (cents, four decimals), and gives the invariant spentCents + remainingCents = capCents. Nothing an agent needs to call or interpret this tool 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 already documents delegationId's default behavior, so the description's restatement is partly redundant. However, it adds genuine semantics beyond the schema: that omission only surfaces budgets that can still pay, and that no_active_delegation masks spent/expired budgets. That edge-case behavior is real added value over baseline 3.

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 precise verb and resource — reads the spending budget pay_service spends from — and enumerates exactly what it returns (cap, spent, remaining, payment count/limit, expiry). An agent can distinguish it from siblings like wallet_balance or payment_summary without opening any 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 explicit triggers: 'whenever the human asks how much is left, or before a run of paid calls.' It also resolves the delegationId alternative (omit for the default budget vs. pass an earlier pay_service delegationId to read a specific one).

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