Skip to main content
Glama

analyze_llm_usage

Read-onlyIdempotent

Calculate LLM spend from normalized usage records and supplied rates, flag unknown models, and identify conditional response-cache opportunities for cost savings.

Instructions

Analyze normalized LLM usage; report costs, unknown models and conditional response-cache opportunities. No network or file access.

Input Schema

NameRequiredDescriptionDefault
ratesYes
recordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false, and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral context by saying it reports unknown models and conditional response-cache opportunities, and by stating 'No network or file access.' It still does not explain error behavior or how unknown models are handled beyond being reported.

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?

The description is a single compact sentence with no wasted words. The main purpose is front-loaded, followed by the report contents and no-I/O constraint.

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

Completeness2/5

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

This is a complex tool with a deeply nested input schema, 0% schema description coverage, and no output schema. The description briefly mentions return contents but does not explain the input structure or enough semantics for records and rates. It is too thin for the tool's complexity.

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 0%, and the input schema is a nested object with required records and rates plus detailed subfields. The description only vaguely gestures at 'normalized LLM usage' and 'costs' without explaining what records, rates, currency, asOf, requestHash, or cachedInputTokens mean. The schema has to carry nearly all parameter meaning.

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?

The description states a specific verb and resource: analyze normalized LLM usage. It also names the report contents (costs, unknown models, response-cache opportunities), which helps distinguish it from a simple cost-estimation sibling. However, it does not explicitly contrast itself with estimate_llm_cost or compare_llm_models.

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 implies that the tool is for analyzing normalized usage records with rates, but it gives no explicit when-to-use guidance. There is no mention of prerequisites, exclusions, or when an agent should choose this tool over estimate_llm_cost or compare_llm_models.

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