Skip to main content
Glama

analyze_latency

Analyze latency distribution across traces with percentiles (P50-P99), average, and max. Optionally drill into per-generation latency to identify bottleneck models.

Instructions

Analyze latency distribution across traces and optionally per generation.

Returns: latency percentiles (P50/P90/P95/P99), average, max. group_by: 'domain', 'name', 'model'. Set include_per_generation=true to also analyze per-LLM-call latency (slower, fetches observations). Identifies which model is the bottleneck.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNo
projectNo
end_dateNo
group_byNo
start_dateNo
time_rangeNo
percentilesNo50,90,95,99
include_per_generationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the transparency burden. It discloses return values (percentiles, average, max), performance impact of include_per_generation, and the ability to identify bottleneck models. It does not discuss authentication, rate limits, or side effects, but as a read-only analysis tool, the disclosed behavior is solid.

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 concise and well-structured, with bulleted return values and a clear note about the optional flag. Every sentence contributes meaning, and the formatting improves readability without unnecessary verbosity.

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 an 8-parameter tool with no annotations, the description covers the core purpose, key parameters, and a performance caveat. It doesn't address all filter parameters (project, time_range), but provides enough context for a competent agent to use the tool correctly. The presence of an output schema (though not shown) lessens the need to fully describe return structures beyond the already included percentiles.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds value by enumerating allowed group_by values ('domain', 'name', 'model') and explaining include_per_generation semantics (per-LLM-call latency, slower). Other parameters like tags and dates are not explained, but the most distinguishing parameters are clarified, earning a 4.

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 it analyzes latency distribution across traces, with an optional per-generation mode. It names the specific resource (latency) and the action (analyze), and distinguishes itself from sibling tools like analyze_sessions by focusing on latency percentiles and bottleneck identification.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool, particularly the trade-off for include_per_generation (slower, fetches observations). It does not explicitly mention alternatives like analyze_sessions, but the focus on latency makes the use case apparent. Absence of explicit exclusions or alternative references prevents a score of 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DrishtantKaushal/LangfuseMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server