Skip to main content
Glama

Get LLM Model Stats

get_llm_model_stats
Read-onlyIdempotent

Get detailed LLM model performance stats: request counts, latency percentiles, token usage, error rates, and finish reasons. Use to pinpoint issues and optimize.

Instructions

Get detailed performance statistics for a specific LLM model.

Analyzes request count, latency percentiles (p50, p95, p99), token usage statistics, error rates, and finish reason distributions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_timeNoEnd time in ISO 8601 format
model_nameYesModel name to analyze (e.g., "gpt-4", "claude-3-opus", "gpt-3.5-turbo")
start_timeNoStart time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
service_nameNoFilter by service name

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.11.0
    • addedInput schema / properties / end_time / description
      Added value: +"End time in ISO 8601 format"
    • addedInput schema / properties / model_name / description
      Added value: +"Model name to analyze (e.g., \"gpt-4\", \"claude-3-opus\", \"gpt-3.5-turbo\")"
    • addedInput schema / properties / service_name / description
      Added value: +"Filter by service name"
    • addedInput schema / properties / start_time / description
      Added value: +"Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)"
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the specific metrics analyzed, which is useful behavioral context. However, it doesn't disclose aggregation behavior, time window defaults, or whether results are grouped, which would add value beyond the annotations.

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 concise and front-loaded with the core purpose, followed by a compact list of metrics. The two-sentence structure is efficient, though the second sentence is a list that could arguably be more integrated. No wasted words.

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?

For a read-only stats tool with full schema coverage and an output schema, the description is largely complete. It covers what the tool does and what metrics it returns. It could be more complete with explicit time-window behavior or grouping semantics, but the annotations and schema cover the essential context.

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 description coverage is 100%, so the schema already documents all parameters. The description adds the model_name example and metric context, but doesn't add meaning beyond the schema for start_time, end_time, or service_name. Baseline 3 is appropriate when the schema does the heavy lifting.

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 clearly states the tool's purpose: getting detailed performance statistics for a specific LLM model, and enumerates the specific metrics (request count, latency percentiles, token usage, error rates, finish reason distributions). This distinguishes it from siblings like get_llm_usage (usage-focused) and get_llm_slow_traces (trace-focused).

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?

The description implies usage context (analyzing a specific model's performance) but does not explicitly state when to use this tool versus alternatives like get_llm_usage, get_session_stats, or get_llm_slow_traces. The sibling list provides context, but the description itself lacks explicit routing guidance.

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