Skip to main content
Glama

Get Usage Statistics

sirv_get_usage
Read-onlyIdempotent

Check the workspace's credit balance and credit usage before running AI tools or when low-credit errors appear. Returns balance, plan tier, credits used, total operations, and top consuming operations.

Instructions

Show the workspace's credit balance and how it used credits.

Use it before a large run of AI tools, or when a tool reports too few credits. It takes no inputs.

Read-only. The balance is the one that AI tools charge, and reading it needs permission to view credits. When it cannot be read, the tool returns an error, never a balance of zero.

Returns:

  • credits: the credit balance.

  • tier: the plan, left out when this sign-in cannot read it.

  • creditsUsed and totalOperations: credits and operations used so far.

  • topOperations: the operations that used the most credits.

  • topUpUrl: the Studio page where the workspace buys more credits.

Credits: free.

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": "sirv_get_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the permission requirement ('reading it needs permission to view credits'), the error semantics ('returns an error, never a balance of zero' — a critical distinction an agent must not misread as zero credit), and that the call itself is free. Annotations already cover read-only and idempotency, so these additions are exactly the extra context that matters.

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-loads the purpose, then usage, then behavior, then returns — a sensible order for a read tool with no output schema. Every line carries information, though the trailing 'Credits: free.' is terse to the point of ambiguity about what 'free' qualifies.

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?

With no output schema, the tool must describe its return shape, and it does so field by field including the conditional omission of 'tier' and the meaning of topOperations and topUpUrl. Combined with the permission and error behavior, nothing an agent needs to call and interpret this correctly 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?

Zero parameters, so the baseline is 4. The description correctly confirms 'It takes no inputs,' which matches the empty schema with additionalProperties:false.

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 specific verb and resource ('Show the workspace's credit balance and how it used credits') and positions itself against the credit-consuming AI tools in the sibling set. An agent can distinguish this read-only usage tool from generation tools like sirv_generate_image 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 Guidelines4/5

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

Gives two concrete triggers: before a large run of AI tools, or when a tool reports too few credits. This is actionable context rather than an implied purpose. It stops short of an explicit 'do not call when...' or a named alternative, so it lands at 4 rather than 5.

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