Skip to main content
Glama

Summarize LLM usage

stack_llm_usage_summary
Read-only

Aggregate LLM usage by product surface, payer, provider, optional model, and UTC day. Returns calls, tokens, provider cost and STACK fee as separate values for the calling account. group_by_model=false collapses models while keeping surface and payer separate.

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

Input Schema

NameRequiredDescriptionDefault
sinceNoISO timestamp lower bound (inclusive)
untilNoISO timestamp upper bound (exclusive)
agent_idNo
providerNo
mission_idNo
passport_jtiNo
group_by_modelNoDefault true. false collapses models per provider.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare this a safe read of a closed system, and the description adds genuinely new context: the returned values are calls, tokens, provider cost and STACK fee reported separately, and results are scoped to the calling account. It does not state a default time window or result-size behavior, which is the remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the operation and its dimensions, followed by the return payload and the single non-obvious flag behavior. No filler and no repetition of the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With seven parameters, no output schema, and three undocumented identifiers, the description covers the output payload well but leaves the filtering semantics of agent_id, mission_id and passport_jti unexplained. An agent could invoke it correctly for a basic account-wide rollup but would have to guess at the scoping filters.

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 43%, so a third of the parameters (agent_id, mission_id, passport_jti) carry no meaning in either the schema or the description. The description does clarify group_by_model beyond the schema by explaining that collapsing models preserves surface and payer separation, which partially compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Aggregate LLM usage" gives a specific verb+resource, and the description enumerates the aggregation dimensions (surface, payer, provider, model, UTC day), which distinguishes it from a raw listing tool like stack_llm_usage_list. It stops short of explicitly contrasting itself with that sibling, so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

Usage is implied by "aggregate" versus the list-style sibling, and the group_by_model toggle gives a concrete scenario for one mode. However, there is no explicit when-to-use versus when-not guidance, and no statement about what happens when the optional time bounds are omitted.

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.