putty
MCPAgentRegistry

agent_usage

Report what the caller's agents spent over a window: one row per agent that spent, most expensive first, with its call count, its credits, and the first and last charge in the window — plus the totals across every agent. Free, and it reads the credit ledger rather than writing to it. Two fields to read carefully: `totalCredits` is the caller's spend across EVERY agent, so it does not change when you filter, and an agent that spent nothing in the window is NOT a row — its absence means zero, not missing. A soft-deleted agent still reports here under the name it had, because a charge belongs to the agent that made it whether or not it is still registered. Refunds do not subtract from a row: only spends count against an agent, and a refunded call that happened still counts as a call.

Report what the caller's agents spent over a window: one row per agent that spent, most expensive first, with its call count, its credits, and the first and last charge in the window — plus the totals across every agent. Free, and it reads the credit ledger rather than writing to it. Two fields to read carefully: totalCredits is the caller's spend across EVERY agent, so it does not change when you filter, and an agent that spent nothing in the window is NOT a row — its absence means zero, not missing. A soft-deleted agent still reports here under the name it had, because a charge belongs to the agent that made it whether or not it is still registered. Refunds do not subtract from a row: only spends count against an agent, and a refunded call that happened still counts as a call.

Input

The tool takes a single JSON object. Every field, its type, and an example are on the generated reference at GET /mcp/tools, under this tool's name.

Calling it

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

Put your arguments in place of the empty object. A call that fails comes back as a normal result carrying isError: true and a message naming what went wrong, not as a JSON-RPC protocol error.

Notes

The category is Agent, subcategory Registry. The full request and response shape, and a live playground, live on the generated reference at GET /mcp/tools.

On this page