Skip to main content
Glama

Usage analytics

pinin_get_usage
Read-only

Read usage analytics for 1–90 days to review request/error/restoration/credit totals, monthly credits and balance, per-key breakdown, and daily trends; use it to explain spend changes or error spikes.

Instructions

Read usage analytics for the last days: totals for requests, errors, restorations and credits; the current month's credits used and balance; a per-key breakdown; and a per-day series. Use it to explain a spend, a spike in errors or a quiet account; use pinin_get_account for the current limits and balance on their own. Read-only and 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": "pinin_get_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoWindow in days, 1–90. Default 30. The monthly block is calendar-month, not this window.

Output Schema

NameRequiredDescriptionDefault
dailyNoOne row per day: `{ day, requests, error_requests, restorations, credits }`.
by_keyNoPer-key rows for the month, with the key prefix and its share of spend.
objectNoAlways `usage`.
totalsNo`{ requests, errors, restorations, credits }` for the window.
monthlyNo`{ period, credits_used, restorations, credits_balance }` for the calendar month.
period_daysNoLength of the window in days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and destructiveHint=false, so safety is covered; the description adds that the call is 'free' and discloses the shape of the returned data, which is real added context. The 'Read-only' phrase merely restates the annotation, and it does not mention any rate limits or windowing cost.

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 verb and scope, then the payload, then routing guidance — no filler sentences. The middle enumeration is dense but each item helps an agent recognize the data it needs; trimming would cost selection accuracy.

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?

An output schema exists, so return values need not be explained, yet the description still sketches them for selection purposes. For a single optional-parameter read tool with full annotation coverage, nothing an agent needs in order to call it correctly is missing.

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% and the `days` parameter is fully documented in the schema, including the 1–90 range and the calendar-month caveat, so the description's 'for the last `days`' adds nothing new. Baseline 3 applies when the schema carries parameter meaning.

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 ('Read usage analytics') and enumerates the exact contents — request/error/restoration/credit totals, monthly credits used and balance, per-key breakdown, per-day series. It explicitly distinguishes itself from pinin_get_account, so an agent can pick between them without reading either 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 concrete use cases ('explain a spend, a spike in errors or a quiet account') and names the alternative plus the condition that selects it ('use pinin_get_account for the current limits and balance on their own'). Both when-to-use and when-not-to-use are covered.

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