talkops-tempo-mcp-server
v0.2.1A Model Context Protocol (MCP) server for Grafana Tempo distributed tracing and observability.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
tempo_get_attribute_names Get Attribute Names
Discover trace attribute names grouped by scope from a Tempo backend. Returns: {"scopes": [{"name": str, "tags": [str, ...]}], "total": int}. When NOT to use: For distinct values of a known attribute, call tempo_get_attribute_values.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
query | Optional TraceQL selector to scope discovered attributes | |
scope | Scope filter: all, resource, span, intrinsic, event, link, instrumentation | |
since | Relative time window, e.g. '1h', '6h' | |
tenant | Tenant ID |
tempo_get_attribute_values Get Attribute Values
Retrieve distinct values for a trace attribute on a Tempo backend. Returns: {"attribute_name": str, "tag_values": [str, ...], "total": int, "possibly_truncated": bool}. When NOT to use: To list available attribute names, call tempo_get_attribute_names.
| Parameter | Type | Description |
|---|---|---|
attribute * | string | Attribute name (e.g. 'service.name', 'http.response.status_code') |
backend_id * | string | Tempo backend ID |
limit | Max values to return | |
query | Optional TraceQL filter to scope values, e.g. '{ status = error }' | |
since | Relative time window, e.g. '1h', '24h' | |
tenant | Tenant ID |
tempo_traceql_search TraceQL Search
Search traces using raw TraceQL and/or structured SearchFilters. Returns: {"effective_query": str, "traces": [...], "truncated": bool, "next_window": {...}|null}. When NOT to use: For time-series aggregations use tempo_traceql_metrics_range; for known trace_id use tempo_summarize_trace.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
filters | Structured search filters (service, namespace, status, min_duration_ms, http_status_gte, leaf_spans_only, min_child_spans, missing_attributes, present_attributes) | |
limit | Max traces to return | |
most_recent | boolean | Append with(most_recent=true) query hint to prioritize newest matching traces |
query | TraceQL query selector, e.g. '{ resource.service.name = "api" && status = error }' | |
since | Relative duration ('1h', '6h') or epoch range ('start..end') | |
spss | Spans per span-set | |
tenant | Tenant ID |
tempo_get_trace Get Trace by ID
Retrieve a trace by ID with optional span-count slicing and time bounds. Returns: {"trace_id": str, "format": "llm"|"otlp_json", "trace": {...}, "llm_format_used": bool}. When NOT to use: For critical path and error facts, call tempo_summarize_trace.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
trace_id * | string | Trace ID (16–32 hex chars) |
max_spans | Maximum spans to return when slicing large traces | |
since | Optional time window ('1h' or 'start..end') to bound trace lookup | |
tenant | Tenant ID |
tempo_summarize_trace Summarize Trace
Extract factual summary of a trace: critical path, self-time hotspots, errors, and K8s context. Returns: {"trace_id": str, "critical_path": [...], "self_time_hotspots": [...], "errors": [...], "deepest_error_span": {...}, "observation_codes": [...]}. When NOT to use: For raw span payloads, call tempo_get_trace.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
trace_id * | string | Trace ID (16–32 hex chars) |
max_spans | integer | Max spans evaluated for critical path |
tenant | Tenant ID |
tempo_query_a2ui Query Trace for A2UI Timeline
Retrieve a trace structured and DAG-pruned for A2UI trace timeline rendering. Returns: {"title": str, "traceId": str, "serviceName": str, "spans": [...]}. When NOT to use: For text-based trace summarization, call tempo_summarize_trace.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
trace_id * | string | Trace ID (16–32 hex chars) |
tenant | Tenant ID for multi-tenant backends |
tempo_compare_traces Compare Two Traces
Compute a 5-axis structural, span-count, timing, error, and attribute diff between two traces. Returns: {"trace_a": {...}, "trace_b": {...}, "structural_diff": {...}, "duration_diff": {...}, "error_diff": {...}}. When NOT to use: For single-trace inspection, call tempo_summarize_trace.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
trace_id_a * | string | Baseline trace ID (16–32 hex chars) |
trace_id_b * | string | Comparison trace ID (16–32 hex chars) |
max_spans | integer | Max spans per trace to compare |
tenant | Tenant ID for multi-tenant backends |
tempo_traceql_metrics_range TraceQL Metrics Range Query
Execute a TraceQL metrics range query returning time-series points and per-series stats. Returns: {"effective_query": str, "result_type": "matrix", "series": [{"labels": {...}, "summary": {...}, "points": [...]}]}. When NOT to use: For single-service RED + baseline comparison, call tempo_analyze_service_red.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
query * | string | TraceQL metrics query, e.g. '{ resource.service.name = "api" } | rate()' |
end | End time as Unix epoch seconds | |
sample | Optional metrics sampling factor, e.g. '0.1' or 'fixed-span:0.1' | |
since | Relative time range, e.g. '1h' | |
start | Start time as Unix epoch seconds | |
step | Step duration, e.g. '30s', '1m' | |
tenant | Tenant ID |
tempo_traceql_metrics_instant TraceQL Metrics Instant Query
Execute a point-in-time TraceQL metrics instant query (vector format). Returns: {"effective_query": str, "result_type": "vector", "result": [...]}. When NOT to use: For time-series trends over time, call tempo_traceql_metrics_range.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
query * | string | TraceQL metrics query for instant evaluation |
end | End time as Unix epoch seconds | |
sample | Optional metrics sampling factor | |
since | Time window to evaluate over | |
start | Start time as Unix epoch seconds | |
tenant | Tenant ID |
tempo_analyze_service_red Analyze Service RED Metrics
Compute factual Rate, Error rate, and P50/P95/P99 latency metrics, optional baseline deltas, and exemplar IDs. Returns: {"service": str, "current": {"rate_rps": float, "error_rate_rps": float, "error_ratio": float, "p50_ms": float, "p95_ms": float, "p99_ms": float}, "baseline": {...}|null, "deltas": {...}|null, "exemplar_trace_ids": [...]}. When NOT to use: For custom non-RED TraceQL metrics pipelines, call tempo_traceql_metrics_range.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
service * | string | Target resource.service.name |
baseline_offset | Optional prior window duration before current window for delta calculation, e.g. '1h' | |
group_by | Optional attribute to group by, e.g. 'span:name' | |
since | string | Current evaluation window, e.g. '15m', '1h' |
tenant | Tenant ID |
tempo_compare_span_cohorts Compare Span Cohorts (TraceQL compare())
Execute a TraceQL compare() instant query to rank attribute values differentiating selection vs baseline spans. Returns: {"effective_query": str, "divergent_attributes": [{"attribute": str, "value": str, "selection_count": float, "baseline_count": float, "skew_delta": float}]}. When NOT to use: For comparing two individual trace IDs, call tempo_compare_traces.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
base_query * | string | Base TraceQL span selector, e.g. '{ resource.service.name = "api" }' |
selection * | string | Selection cohort filter, e.g. '{ span:status = error }' or '{ span:duration > 1s }' |
since | string | Evaluation time window, e.g. '1h' |
tenant | Tenant ID | |
top_n | integer | Top N values per attribute |
tempo_get_exemplar_traces Get Exemplar Traces
Extract exemplar trace IDs from a TraceQL metrics range query. Returns: {"trace_candidates": [{"trace_id": str, "timestamp": float, "labels": {...}}], "total": int}. When NOT to use: For attribute-based trace search, call tempo_traceql_search.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
query * | string | TraceQL metrics query to fetch exemplars from, e.g. '{ status = error } | rate()' |
limit | integer | Max exemplar candidates to return |
since | Time window | |
tenant | Tenant ID |
tempo_get_trace_from_log Get Trace from Log
Extract a trace ID (W3C traceparent, JSON, logfmt, or hex32) from text and summarize the trace. Returns: {"extracted_trace_id": str|null, "extracted_span_id": str|null, "format": str|null, "trace_summary": {...}|null}. When NOT to use: If trace_id is already known, call tempo_summarize_trace directly.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
log_line * | Log line, JSON entry, or W3C traceparent header containing a trace ID | |
tenant | Tenant ID |
tempo_get_diagnostics Get Tempo Diagnostics
Collect factual health, version (2.x/3.x), ring, discarded-span, config, and Operator CR observations. Returns: {"ready": bool, "architecture_generation": str, "findings": [{"code": str, "component": str, "message": str, "evidence": {...}}], "observation_codes": [...]}. When NOT to use: For simple backend inventory, read 'tempo://system/backends'.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
include | Optional sections to include: health, components, rings, ingestion, config, overrides, operator | |
tenant | Optional tenant ID |
tempo_get_service_dependencies Get Service Dependencies
Discover service nodes and client->server call edges via Prometheus service-graphs, TraceQL metrics, or trace DAG sampling. Returns: {"nodes": [{"service": str}], "edges": [{"client": str, "server": str, "source": str, ...}], "source_used": str, "method": str}. When NOT to use: For single-trace waterfall inspection, call tempo_summarize_trace.
| Parameter | Type | Description |
|---|---|---|
backend_id * | string | Tempo backend ID |
sample_traces | integer | Max traces to sample for DAG edge extraction fallback when metrics edges are empty |
service | Optional service name to filter upstream/downstream edges | |
since | Time window to analyze | |
tenant | Tenant ID |