Skip to main content
Glama

Get LLM Slow Traces

get_llm_slow_traces
Read-onlyIdempotent

Identify slowest 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of traces to return (default: 10)
end_timeNoEnd time in ISO 8601 format
start_timeNoStart time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
service_nameNoFilter by service name
min_duration_msNoMinimum duration threshold in milliseconds (only return traces above this)
gen_ai_request_modelNoFilter by requested model name (e.g., "gpt-4")
gen_ai_response_modelNoFilter by actual model used (e.g., "gpt-4-0613")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.11.0
    • addedInput schema / properties / end_time / description
      Added value: +"End time in ISO 8601 format"
    • addedInput schema / properties / gen_ai_request_model / description
      Added value: +"Filter by requested model name (e.g., \"gpt-4\")"
    • addedInput schema / properties / gen_ai_response_model / description
      Added value: +"Filter by actual model used (e.g., \"gpt-4-0613\")"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of traces to return (default: 10)"
    • addedInput schema / properties / min_duration_ms / description
      Added value: +"Minimum duration threshold in milliseconds (only return traces above this)"
    • 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.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds 'slowest ... by duration' which implies an ordering behavior not present in annotations, but it stops short of explaining sorting direction, default time windows, or other behavioral details.

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 short and front-loaded: the first sentence states the core purpose, and the second provides practical context. Both sentences earn their place, though the second sentence is somewhat generic and could be more specific about the tool's differentiating value.

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?

The tool has 7 optional parameters, a full schema, output schema, and annotations that cover read-only behavior. The description, while brief, is sufficient for an agent to understand the tool's primary function and call it correctly. The main missing piece is differentiation from similar siblings, but that is more of a usage-guidelines gap.

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 every parameter is already documented. The description adds no additional meaning about parameters such as time filtering, service_name, or model filters; it only refers to duration generally. Baseline 3 is appropriate given the rich schema.

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 clearly states a specific verb ('Find'), resource ('LLM traces'), and criterion ('by duration', 'slowest'). It is unambiguous about what the tool does, but it does not explicitly contrast with close siblings like get_llm_expensive_traces or search_traces, so it falls short of full sibling differentiation.

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 gives a general use case ('performance optimization and identifying latency bottlenecks') which implies when the tool is useful, but it does not explicitly state when to use it versus alternatives or provide exclusions. No alternative tools are named.

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