Skip to main content
Glama
mshegolev

jaeger-mcp

by mshegolev

jaeger_span_statistics

Read-onlyIdempotent

Calculate p50/p95/p99 latency and error rate per operation using recent traces, helping 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?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows this is a safe read. The description adds rich behavioral context: it aggregates spans by operation name, reports p50/p95/p99 in microseconds, error rate formula, and the return structure. No contradictions with annotations.

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-organized: a one-sentence summary, then calculation details, units, examples, exclusions, and return value. Every section earns its place—no wasted words, and the 'Returns' block clarifies expected output even though an output schema exists.

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 tool's complexity (aggregation, multiple metrics, parameter combinations) and the presence of an output schema and annotations, the description is thorough. It covers use cases, parameter effects, output format, and explicitly lists sibling tools for alternatives, leaving little ambiguity for the agent.

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 coverage is 100% with each parameter described, so the baseline is 3. The description adds value by explaining how 'limit' affects sample size/accuracy and that 'operation' filters traces before aggregation. It also gives parameter-specific examples (e.g., service='order-service'), but it doesn't fully replace the schema's role.

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 opens with a specific verb+resource+scope: 'Compute per-operation latency percentiles and error rates across recent traces.' It clearly distinguishes from siblings by stating 'Don't use when: You want to compare two specific traces (use jaeger_compare_traces instead)' and similarly for jaeger_get_trace.

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?

Explicit 'Use when' and 'Don't use when' sections provide concrete example queries with parameter settings and alternative tool names. This gives the agent clear decision rules for when to select this tool versus siblings like jaeger_compare_traces and jaeger_get_trace.

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