Skip to main content
Glama

optionality_get_api_usage_stats

Aggregated LLM usage and cost for this patron's calls.

Returns {"models": [{"model", "runs", "total_calls", "total_input_tokens", "total_output_tokens", "total_cost_usd", "priced_runs"}, ...], "totals": {...}}. One row per distinct model the patron's tool calls have invoked.

total_cost_usd is what the PROVIDER reported for those calls, not a figure reconstructed from a price table — tokens from two models are not comparable money, so a local table goes wrong the moment the route changes model. priced_runs says how many of runs carried a reported cost, so a caller can render "$0.42 across 3 of 5 runs" rather than implying the rest were free. totals.avg_cost_usd is what one call actually costs to serve — the number that says whether a tool's sats price covers its own compute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
npubNoRequired. Your Nostr public key (npub1...) for credit billing.
dpop_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It adds context about the output fields, including the caveat that total_cost_usd is provider-reported and not comparable across models, and explains priced_runs and avg_cost_usd. However, it does not explicitly state that the operation is read-only, safe, or idempotent, nor does it mention any side effects or authorization needs beyond the npub hint in the schema.

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?

The description is front-loaded with the purpose, then provides the output format in a code block, followed by a detailed yet relevant explanation of cost fields. It is longer than strictly necessary but each sentence adds useful information. Could be slightly more concise, but structure is good.

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?

Given the complexity of the return data (models, totals, cost nuances) and the absence of an output schema, the description compensates well by providing the full output structure and clarifying the meaning of each field. It also warns against misinterpreting cost comparisons. However, it lacks context on error handling, rate limits, or whether historical data is available. Still, it covers the most critical aspects for an AI agent to parse the response correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (dpop_token lacks description). The tool description itself does not mention any parameters or their meanings. The npub parameter is described in the schema as required for billing, but the description adds no extra value for parameters. This is a missed opportunity to explain dpop_token or clarify usage.

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?

The description starts with a clear statement of what the tool does: 'Aggregated LLM usage and cost for this patron's calls.' This is specific, uses a verb+resource format, and distinguishes it from the many sibling tools that deal with balances, profiles, or coupons. No ambiguity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like optionality_get_leaderboard or optionality_check_balance. It does not mention scenarios, prerequisites, or exclusions. An AI agent must infer usage solely from the tool's name and summary.

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.

TDQS

B3.1/5.0
Disambiguation2/5

There is substantial overlap and confusion between multiple sets of tools. For example, `optionality_get_operator_onboarding_status` and `optionality_get_patron_onboarding_status` serve different identities but have a similar purpose that could be confusing. More critically, there are generic-named tools like `optionality_receive_credentials` and `optionality_receive_npub_proof` that both drain a relay mailbox in a very similar way, distinguished primarily by the type of token they return. The presence of both `optionality_session_status` and `optionality_service_status` is a major point of ambiguity, as both seem to check the health and configuration of the operator.

Naming Consistency4/5

The naming convention is highly consistent, using a snake_case, verb_noun pattern (e.g., `list_journal`, `delete_journal`). The prefix `optionality_` is applied to all tools. The verb 'get' and 'list' are used predictably. Minor point deduction for a few outliers like `optionality_deal_scenario` and `optionality_judge_trade` which are domain-specific verbs that don't perfectly fit the CRUD pattern but are still clear in context.

Tool Count1/5

With 71 tools, this server is severely over-staffed. This indicates poor separation of concerns, likely bundling multiple distinct domains or services into a single surface. A tool count this high dramatically increases cognitive load and API surface area, making it difficult for an agent to find the correct tool.

Completeness3/5

The tool surface covers an enormous amount of functionality, including imaginative ownership-proof flows via Nostr DMs. However, the `check_balance`/`purchase_credits` flow appears incomplete without a `refund_credits` tool for operator support scenarios. While the server has a `restore_credits` tool, it requires authentication. Overall, the surface is individually creative but organizationally incoherent.