Skip to main content
Glama

Get LLM Model Stats

get_llm_model_stats
Read-onlyIdempotent

Get detailed performance statistics for a specific LLM model.

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
limitNoMaximum traces to analyze (default: 1000, capped by MAX_TRACES_PER_QUERY / --max-traces-per-query)
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. Changed1 schema field changedv0.13.0
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 1000,
      +  "description": "Maximum traces to analyze (default: 1000, capped by MAX_TRACES_PER_QUERY / --max-traces-per-query)",
      +  "type": "integer"
      +}
  2. 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)"
  3. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, and open-world behavior, lowering the disclosure burden. The description adds meaningful context by naming the metrics analyzed (latency percentiles, token usage, error rates, finish reasons), though it omits any note on data scope or defaults.

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 core action and followed by the analyzed metrics. No filler, repetition, or unnecessary detail.

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?

An output schema exists, so return-value structure need not be explained, and all parameters are documented. However, the description does not clarify default time-window behavior when start_time and end_time are null, nor how it relates to sibling stats tools, leaving a small gap for correct invocation.

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 all five parameters are fully documented in the input schema. The description adds no parameter-level meaning beyond the schema, which is acceptable at this coverage level but not value-adding.

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 uses a specific verb and resource ('Get detailed performance statistics for a specific LLM model') and enumerates the exact metrics analyzed. It does not differentiate itself from siblings like get_llm_usage or get_llm_slow_traces, which could be confused with this tool.

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?

It implies usage by saying 'for a specific LLM model,' but gives no explicit when-to-use guidance, prerequisites, or alternatives. The agent must infer when this is preferable to get_llm_usage, get_llm_slow_traces, or search_traces.

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