Skip to main content
Glama

jaeger_span_statistics

Read-onlyIdempotent

Compute latency percentiles and error rates per operation from recent traces to pinpoint slow or failing endpoints.

Instructions

Compute per-operation latency percentiles and error rates across recent traces.

Fetches up to limit traces for the given service (optionally filtered by operation), then aggregates all spans by operation name. For each operation reports: span count, p50/p95/p99 duration in microseconds, error count, and error rate.

Duration values are in microseconds (integer). Error rate is error_count / span_count (float, 0.0–1.0).

Examples: - Use when: "What are the p95 latencies for each endpoint in order-service?" → service='order-service'; inspect each operation's p95_duration_us. - Use when: "How often does the POST /checkout endpoint error?" → service='checkout-svc', operation='POST /checkout'; check error_rate in the stats. - Use when: "Compare latency distributions across operations" → look at p50 vs p99 spread to identify high-variance operations. - Use when: "Get a larger sample for more accurate stats" → limit=100 for higher confidence percentiles. - Don't use when: You want to compare two specific traces (use jaeger_compare_traces instead). - Don't use when: You want full span detail for a single trace (use jaeger_get_trace instead).

Returns: dict with service / operation / trace_count / stats (list of per-operation stats with count, p50/p95/p99 duration_us, error_count, error_rate).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of traces to fetch and analyze (1-100, default 20).
serviceYesService name to compute statistics for (required). Use jaeger_list_services to discover valid names.
operationNoOperation name filter (optional). When set, only traces matching this operation are fetched. Use jaeger_list_operations to discover valid names.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statsYes
serviceYes
operationYes
trace_countYes
Behavior5/5

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

The description adds significant behavioral context beyond annotations: it explains the tool fetches up to `limit` traces, aggregates spans by operation, reports p50/p95/p99, error count, and error rate formulas. Annotations already indicate readOnlyHint=true, idempotentHint=true, destructiveHint=false, and the description aligns perfectly without contradiction.

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 well-structured with clear sections: purpose, behavior, examples (use/don't use), and returns. Each sentence adds value, no fluff. Examples are formatted with code blocks for clarity. Despite being detailed, it remains concise and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complete input schema, thorough annotations, and described output structure, the description is fully complete. It tells the agent what the tool does, how to use each parameter, when to use alternatives, and what the response format is. The sibling list further aids disambiguation.

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

Parameters5/5

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

The input schema provides 100% coverage with descriptions for all three parameters. The description adds extra meaning by explaining how parameters are used in examples (e.g., `limit=100` for larger sample, `operation` to filter). It also mentions fetching 'recent traces' and the aggregation process, enriching the schema's defaults and constraints.

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 the tool computes per-operation latency percentiles and error rates across recent traces. It uses specific verbs and resources ('compute', 'per-operation latency percentiles', 'error rates') and distinguishes from siblings like jaeger_compare_traces and jaeger_get_trace by focusing on aggregate statistics rather than individual trace comparison.

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

Usage Guidelines5/5

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

The description provides explicit use cases with examples, such as 'What are the p95 latencies for each endpoint?' and 'How often does the POST /checkout endpoint error?'. It also includes 'Don't use when' scenarios with specific sibling tool alternatives (jaeger_compare_traces, jaeger_get_trace), giving clear guidance on when to choose this tool over others.

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/mshegolev/jaeger-mcp'

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