Skip to main content
Glama

jaeger_compare_traces

Read-onlyIdempotent

Structurally compare two Jaeger traces by matching spans on operation and service, revealing added, removed, and changed spans with duration and tag differences.

Instructions

Compare two traces structurally — find added, removed, and changed spans.

Fetches both traces from Jaeger and performs a structural diff by matching spans on (operationName, serviceName, parentOperation) — not span IDs, which differ across traces. Reports duration deltas and tag differences for changed spans.

Examples: - Use when: "What changed between a fast and slow request?" → pass the trace IDs of both requests; inspect changed_spans for duration deltas. - Use when: "Did a deployment add new service calls?" → compare a pre-deploy trace with a post-deploy trace; check added_spans for new operations. - Use when: "Are these two traces structurally identical?" → if added_spans, removed_spans, and changed_spans are all empty, the traces have the same structure. - Don't use when: You want aggregate statistics across many traces (use jaeger_span_statistics instead, once available). - Don't use when: You only have one trace — use jaeger_get_trace for single-trace inspection.

Returns: dict with trace_id_a / trace_id_b / added_spans / removed_spans / changed_spans (with duration + tag deltas) / unchanged_count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trace_id_aYesFirst trace ID (baseline) as a hex string (16 or 32 hex chars). Obtain from jaeger_search_traces.
trace_id_bYesSecond trace ID (comparison) as a hex string (16 or 32 hex chars). Obtain from jaeger_search_traces.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
trace_id_aYes
trace_id_bYes
added_spansYes
changed_spansYes
removed_spansYes
unchanged_countYes
Behavior5/5

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

Annotations declare readOnlyHint=true and destructiveHint=false. The description adds behavioral details: it fetches traces, matches on (operationName, serviceName, parentOperation), and reports duration/tag deltas, providing transparency beyond 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?

Well-structured with examples and a returns section; front-loaded purpose. Every sentence is useful, no wasted words.

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 tool complexity, output schema existence, and rich annotations, the description fully covers matching logic, use cases, and return structure, leaving no gaps.

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 descriptions for both parameters. The description adds value by mentioning 'Obtain from jaeger_search_traces' and context on hex format, slightly improving over the baseline 3.

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 'Compare two traces structurally — find added, removed, and changed spans.' It uses specific verbs and resources, and distinguishes from sibling tools by explicitly contrasting with aggregate statistics and single-trace inspection.

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?

Provides explicit when-to-use examples (e.g., 'What changed between a fast and slow request?') and when-not-to-use with alternatives (e.g., 'use jaeger_get_trace'), giving clear context for tool selection.

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