Skip to main content
Glama

Get credit ledger

get_credit_ledger
Read-onlyIdempotent

Show your credit transaction history: every debit and refund behind the current balance, most recent first. Each entry has a type ('debit' or 'refund'), the job_id it belongs to, the amount, a reason and a timestamp. Use this to explain WHY the balance is what it is — e.g. a job that debited 100 credits and was then refunded on exhaustion/failure shows up as a matching debit + refund pair, so the balance returning to its prior value is a legitimate refund, not the debit having failed to apply. Does not run a new discovery and does not cost credits. Pass limit to bound how many recent transactions are returned (default 50, max 200).

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

Input Schema

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive and closed-world, so the bar is lower, yet the description adds real behavioral context: no credit cost, no side effects, newest-first ordering, and the refund-pair semantics that prevent misreading a returned balance as a failed debit. It also discloses default (50) and max (200) result bounds, which no annotation provides.

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 purpose and ordering, then constraints; every sentence carries information. The debit/refund reconciliation sentence is the longest and is the one most prone to being skimmed, but it earns its place by explaining a genuinely non-obvious result pattern.

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 single-parameter read tool with an output schema, the description covers purpose, ordering, cost, side effects, result bounds, and the semantics needed to interpret entries. It even sketches the return fields, which the output schema handles formally, so nothing an agent needs to call and interpret it 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 0% — `limit` has no description at all — so the description must carry it, and it does: purpose ('bound how many recent transactions are returned'), default 50, and max 200. A small wrinkle: the schema default is null while the description says default 50, which reads as a server-side default rather than a contradiction, but it is slightly imprecise.

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?

Opens with a specific verb+resource: 'Show your credit transaction history: every debit and refund behind the current balance.' It also states ordering ('most recent first') and implicitly separates itself from the balance-reading sibling by framing itself as the explanation layer rather than the number itself.

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

Usage Guidelines4/5

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

Gives a clear when-to-use: 'Use this to explain WHY the balance is what it is,' including the concrete case of reconciling a debit+refund pair. It also states what it does NOT do ('does not run a new discovery and does not cost credits'), but it never names get_credit_balance as the alternative for simply reading the current total, so routing relies on inference.

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