Skip to main content
Glama

Get credit usage

get_credit_usage
Read-only

Retrieve recent Sparkles credit usage, including image generation charges; negative amounts show spending and positive amounts show refunds.

Instructions

Read recent Sparkles credit usage, including image generation charges. Amounts are negative for spending and positive for refunds.

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_credit_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number. Defaults to 1.
page_sizeNoEntries per page. Defaults to 10.

Output Schema

NameRequiredDescriptionDefault
pageYes
totalYes
entriesYes
currencyNo
pageSizeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so safety is covered. The description adds real value beyond that by explaining the sign convention (negative = spending, positive = refunds), which is essential for interpreting amounts, and by flagging the limited 'recent' window. It does not describe ordering or how far back the window extends.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no waste; the scope and the sign convention are both front-loaded and immediately actionable.

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?

For a simple, zero-required-parameter read tool with full schema coverage, complete annotations, and an output schema, the description covers purpose and amount semantics adequately. The one gap is that 'recent' is left undefined, so an agent cannot tell how far back the data reaches or whether pagination extends beyond that window.

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?

Schema coverage is 100%: both page and page_size are documented with defaults and the page_size enum of 10/20/50. The description adds no pagination guidance or limits beyond what the schema already states, so the baseline of 3 applies.

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 verb and resource (read credit usage) and adds scope ('recent') plus the domain ('Sparkles', including image generation charges). It implicitly separates usage from the sibling get_credit_balance by focusing on transaction history rather than a current total, though it never names that distinction 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?

Usage is only implied: an agent can infer this is for inspecting historical charges rather than a current balance, but the description never states when to pick it over get_credit_balance or what time window 'recent' covers. No exclusions or prerequisites are given.

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