Skip to main content
Glama
OpenTelemetry MCP Server

OpenTelemetry MCP Server

by traceloop

Get Llm Model Stats

get_llm_model_stats

Analyze a specific LLM model's request count, latency percentiles, token usage, error rates, and finish reasons to compare performance and diagnose issues over a time range.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model_name": "<model_name>"
    },
    "name": "get_llm_model_stats"
  }
}

Input 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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

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 must carry behavioral load. It usefully discloses what the analysis covers (request count, p50/p95/p99 latency, token usage, error rates, finish reasons), but says nothing about side effects, permissions, behavior when the model doesn't exist, or what happens when start_time/end_time are omitted.

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?

Two short sentences, front-loaded with the purpose, then the metric breakdown. The metric list partially duplicates what the output schema likely conveys, but it is compact and orientation-useful rather than wasteful.

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?

An output schema exists, so return-shape explanation isn't required, and the purpose is clear. The notable gap is the unspecified default time window when start_time/end_time are omitted, which materially affects results for a statistics tool with no annotations.

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 model_name and the ISO 8601 time bounds. The description adds no extra meaning about the time window semantics, defaults, or how service_name interacts with model_name; baseline 3 applies.

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?

States a specific verb and resource ("Get detailed performance statistics for a specific LLM model") and enumerates the metric families analyzed, so an agent knows this is per-model performance analytics rather than raw usage or traces. It stops short of naming how it differs from siblings like get_llm_usage or get_llm_slow_traces.

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 only implied: performance/latency/error analysis for one named model, versus list_llm_models for discovery. There is no explicit when-to-use, when-not-to-use, or named alternative, and no statement that model_name must come from list_llm_models.

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