Skip to main content
Glama

get_llm_slow_traces

Locate long-running LLM traces by duration to pinpoint latency bottlenecks and optimize performance.

Instructions

Find slowest LLM traces by duration.

Useful for performance optimization and identifying latency bottlenecks.

Args: limit: Maximum number of traces to return (default: 10) start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format min_duration_ms: Minimum duration threshold in milliseconds (only return traces above this) service_name: Filter by service name gen_ai_request_model: Filter by requested model name (e.g., "gpt-4") gen_ai_response_model: Filter by actual model used (e.g., "gpt-4-0613")

Returns: JSON string with top N slowest traces sorted by duration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
end_timeNo
start_timeNo
service_nameNo
min_duration_msNo
gen_ai_request_modelNo
gen_ai_response_modelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that results are sorted by duration and capped at a limit, which implies a read-only operation, but says nothing about permissions, rate limits, or whether traces are truncated. Adequate but not rich.

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?

Front-loaded one-line purpose followed by use case and parameter list; the Args/Returns structure is scannable. The parameter block is somewhat long but each entry is terse and earns its place given 0% schema coverage.

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 values need not be explained in depth, and the description still notes the top-N-descending result shape. Combined with full parameter coverage and a mutation-free profile, an agent has enough to call this correctly; only sibling routing is left wanting.

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 — and it does, documenting all 7 parameters with formats and examples (ISO 8601 for time, 'gpt-4' / 'gpt-4-0613' for the model params, default 10 for limit). It adds meaning the bare schema lacks, though it omits any clarification of the request vs. response model distinction.

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?

Specific verb+resource: 'Find slowest LLM traces by duration' — an agent immediately knows this returns traces ranked by latency. It distinguishes itself from get_llm_expensive_traces by emphasizing duration/latency rather than cost, though it never names that sibling explicitly to make the differentiation airtight.

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?

'Useful for performance optimization and identifying latency bottlenecks' implies the when-to-use context, but gives no explicit exclusions or alternatives. With siblings like get_llm_expensive_traces and find_errors in the same family, the agent must infer the routing itself.

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