tracehub-mcp
v0.13.2Query OTel traces across Jaeger, Tempo, Traceloop, Datadog, Sentry, X-Ray, New Relic, Honeycomb.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_traces Search Traces
Search for OpenTelemetry traces with filters. Supports both simple parameters and advanced generic filter system.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
filters | Generic filter conditions (advanced) - list of filter objects with: - field: Field name in dotted notation (e.g., "gen_ai.usage.prompt_tokens") - operator: Comparison operator (equals, not_equals, gt,… | |
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) | |
gen_ai_system | Filter by LLM provider (e.g., openai, anthropic) | |
has_error | Filter traces with errors | |
limit | integer | Maximum number of traces to return (1-1000, default: 100) |
max_duration_ms | Maximum trace duration in milliseconds | |
min_duration_ms | Minimum trace duration in milliseconds | |
operation_name | Filter by operation/span name | |
service_name | Filter by service name (use filters for advanced queries) | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) | |
tags | Additional tag filters as key-value pairs |
get_trace Get Trace
Get complete trace details by trace ID. Returns all spans with attributes, including parsed Opentelemetry data for LLM operations.
| Parameter | Type | Description |
|---|---|---|
trace_id * | string | Trace identifier |
detail_level | string | "full" (default) returns every attribute/event value in full, unchanged from this tool's original behavior. "summary" elides known-large gen_ai.* fields (input/output messages, system instructions, re… |
triage_trace Triage Trace
Synthesize a likely-root-cause diagnosis for a trace, instead of returning raw trace data for the caller to re-derive one from every time. Computes a critical path (the "Last Finishing Child" chain actually responsible for the trace's total latency), ranks spans by self-time (latency contribution net of children, top 10), and - when the trace contains an error anywhere under any root span - identifies the deepest error span in the trace's error chain as the likely root cause. Falls back to the highest self-time span as a pure-latency diagnosis when no error is present. Deterministic (no LLM c…
| Parameter | Type | Description |
|---|---|---|
trace_id * | string | Trace identifier |
detail_level | string | "summary" (default) returns a compact diagnosis only - this differs from get_trace's own "full"-by-default, since a triage result is already a small synthesized diagnosis rather than a raw data dump,… |
correlate_trace Correlate Trace
Try to find the corresponding trace in a second, independently- configured backend (e.g. a Datadog trace and its downstream Sentry error, joined) - given a trace_id known to the primary backend. Tries a direct trace_id match in the secondary backend first (confidence "high"); if that fails, falls back to a time-window + service-name-overlap heuristic search (confidence "low"). This is a best-effort correlation, not a guaranteed join - see the always-present `limitations` in the result for why. Requires a secondary backend to be configured via SECONDARY_BACKEND_TYPE/SECONDARY_BACKEND_URL (and…
| Parameter | Type | Description |
|---|---|---|
trace_id * | string | Trace identifier, as known to the primary (already configured) backend. |
get_llm_usage Get LLM Usage
Get aggregated LLM usage metrics (token counts) for a time period. Provides breakdowns by model and service.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
gen_ai_request_model | Filter by requested model name | |
gen_ai_response_model | Filter by actual model used | |
gen_ai_system | Filter by LLM provider | |
limit | integer | Maximum traces to analyze (default: 1000) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format |
list_services List Services
List all available services in the OpenTelemetry backend. Returns: JSON string with list of services
find_errors Find Errors
Find traces with errors. Including detailed error messages, stack traces, and LLM-specific error information.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
limit | integer | Maximum error traces to return (default: 100) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format |
list_llm_models List LLM Models
List all LLM models being used with usage statistics. Discovers what models are deployed and tracks their usage patterns.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
gen_ai_system | Filter by LLM provider (e.g., openai, anthropic, cohere) | |
limit | integer | Maximum traces to analyze for model discovery (default: 1000) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
get_llm_model_stats Get LLM Model Stats
Get detailed performance statistics for a specific LLM model. Analyzes request count, latency percentiles (p50, p95, p99), token usage statistics, error rates, and finish reason distributions.
| Parameter | Type | Description |
|---|---|---|
model_name * | string | Model name to analyze (e.g., "gpt-4", "claude-3-opus", "gpt-3.5-turbo") |
end_time | End time in ISO 8601 format | |
limit | integer | Maximum traces to analyze (default: 1000, capped by MAX_TRACES_PER_QUERY / --max-traces-per-query) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
list_sessions List Sessions
List conversations/sessions grouped by gen_ai.conversation.id. Groups spans that carry the gen_ai.conversation.id attribute (a real, cross-industry OTel semantic convention for session/conversation grouping) to surface per-conversation span counts, token usage, and time bounds - useful for understanding multi-turn conversation activity.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
gen_ai_system | Filter by LLM provider (openai, anthropic, etc.) | |
limit | integer | Maximum spans to analyze (default: 1000) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
get_session_stats Get Session Stats
Get detailed statistics for a single conversation/session. Analyzes span count, distinct services, time bounds, LLM request/success/ error counts, latency percentiles, and token usage for every span sharing the given gen_ai.conversation.id.
| Parameter | Type | Description |
|---|---|---|
conversation_id * | string | The gen_ai.conversation.id to analyze |
end_time | End time in ISO 8601 format | |
limit | integer | Maximum spans to analyze (default: 1000) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
compare_time_windows Compare Time Windows
Compare aggregated LLM usage metrics between two time windows. Runs the same usage aggregation for both ranges and returns the delta - useful for "this week vs last week" or "before/after a deploy" style comparisons of request/token counts.
| Parameter | Type | Description |
|---|---|---|
gen_ai_request_model | Filter by requested model name (applied to both ranges) | |
gen_ai_response_model | Filter by actual model used (applied to both ranges) | |
gen_ai_system | Filter by LLM provider (applied to both ranges) | |
limit | integer | Maximum number of traces to analyze per range (default: 1000) |
range_a_end | Range A end time in ISO 8601 format | |
range_a_start | Range A start time in ISO 8601 format | |
range_b_end | Range B end time in ISO 8601 format | |
range_b_start | Range B start time in ISO 8601 format | |
service_name | Filter by service name (applied to both ranges) |
investigate_cost_spike Investigate Cost Spike
Investigate an LLM cost spike: compare a recent window against a baseline and rank which models/services contributed most to the change. On-request/pull-based analysis, not a push alert - mirrors SigNoz's own "investigate telemetry cost" skill. Call this when you suspect (or want to check for) a cost increase, rather than polling get_llm_usage by hand.
| Parameter | Type | Description |
|---|---|---|
recent_end * | string | Recent window end time in ISO 8601 format |
recent_start * | string | Recent window start time in ISO 8601 format |
baseline_end | Baseline window end (ISO 8601) | |
baseline_start | Baseline window start (ISO 8601). If omitted along with baseline_end, auto-computed as the same duration immediately preceding recent_start. | |
gen_ai_request_model | Filter by requested model name (applied to both windows) | |
gen_ai_response_model | Filter by actual model used (applied to both windows) | |
gen_ai_system | Filter by LLM provider (applied to both windows) | |
limit | integer | Maximum number of traces to analyze per window (default: 1000) |
service_name | Filter by service name (applied to both windows) | |
top_n | integer | Maximum ranked contributors to return per breakdown (default: 5, max: 50) |
investigate_error_spike Investigate Error Spike
Investigate an error-rate spike: compare a recent window against a baseline and rank which services/models/error types contributed most. is_spike requires both an absolute error-count floor and a relative rate-multiplier to hold, so a tiny sample (e.g. 1 error becoming 2) doesn't read as a spike.
| Parameter | Type | Description |
|---|---|---|
recent_end * | string | Recent window end time in ISO 8601 format |
recent_start * | string | Recent window start time in ISO 8601 format |
baseline_end | Baseline window end (ISO 8601) | |
baseline_start | Baseline window start (ISO 8601). If omitted along with baseline_end, auto-computed as the same duration immediately preceding recent_start. | |
limit | integer | Maximum number of traces to analyze per window (default: 1000) |
min_error_count_increase | integer | Minimum absolute error-count increase to count as a spike (default: 3) |
rate_multiplier_threshold | number | Minimum error-rate multiplier (recent / baseline) to count as a spike (default: 2.0) |
service_name | Filter by service name (applied to both windows) | |
top_n | integer | Maximum ranked contributors to return per breakdown (default: 5, max: 50) |
get_prompt_version_stats Get Prompt Version Stats
Get aggregated performance stats grouped by prompt name and version. Groups spans by gen_ai.prompt.name + gen_ai.prompt.version, mirroring Langfuse's shipped per-prompt Metrics tab. Real-world adoption of these two attributes is still thin, so this tool may often return an empty list until more instrumentations populate them.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
gen_ai_system | Filter by LLM provider (openai, anthropic, etc.) | |
limit | integer | Maximum spans to analyze (default: 1000) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
get_llm_expensive_traces Get LLM Expensive Traces
Find traces with highest LLM token usage. Useful for cost optimization and identifying inefficient prompts.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
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") | |
limit | integer | Maximum number of traces to return (default: 10) |
min_tokens | Minimum token count threshold (only return traces above this) | |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
get_llm_slow_traces Get LLM Slow Traces
Find slowest LLM traces by duration. Useful for performance optimization and identifying latency bottlenecks.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
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") | |
limit | integer | Maximum number of traces to return (default: 10) |
min_duration_ms | Minimum duration threshold in milliseconds (only return traces above this) | |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |
search_spans_tool Search Spans
Search for individual OpenTelemetry spans with optional filters. Unlike search_traces, this returns individual spans rather than grouped traces, which is useful for analyzing specific operations or finding spans with certain characteristics (e.g., LLM tool calls with traceloop.span.kind == tool).
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
filters | Generic filter conditions - list of filter objects with: - field: Field name in dotted notation (e.g., "traceloop.span.kind") - operator: Comparison operator - value: Single value for most operators -… | |
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") | |
gen_ai_system | Filter by LLM provider (e.g., openai, anthropic) | |
has_error | Filter spans with errors | |
limit | integer | Maximum number of spans to return (1-1000, default: 100) |
max_duration_ms | Maximum span duration in milliseconds | |
min_duration_ms | Minimum span duration in milliseconds | |
operation_name | Filter by operation/span name | |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) | |
tags | Additional tag filters as key-value pairs |
list_llm_tools_tool List LLM Tools
List all LLM tools being used by identifying traceloop.span.kind == tool. Discovers which tools/functions LLM applications are calling, grouped by tool name with usage statistics.
| Parameter | Type | Description |
|---|---|---|
end_time | End time in ISO 8601 format | |
gen_ai_system | Filter by LLM provider (openai, anthropic, etc.) | |
limit | integer | Maximum spans to analyze (default: 1000) |
service_name | Filter by service name | |
start_time | Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) |