opentelemetry-mcp
v0.2.2MCP server for querying OpenTelemetry traces from LLM applications with Opentelemetry support
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_traces
Search for OpenTelemetry traces with filters. Supports both simple parameters and advanced generic filter system. Args: service_name: Filter by service name (use filters for advanced queries) operation_name: Filter by operation/span name start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format min_duration_ms: Minimum trace duration in milliseconds max_duration_ms: Maximum trace duration in milliseconds gen_ai_system: Filter by LLM provider (e.g., openai, anthropic) gen_ai_request_model: Filter by requested m…
| Parameter | Type | Description |
|---|---|---|
end_time | ||
filters | ||
gen_ai_request_model | ||
gen_ai_response_model | ||
gen_ai_system | ||
has_error | ||
limit | integer | |
max_duration_ms | ||
min_duration_ms | ||
operation_name | ||
service_name | ||
start_time | ||
tags |
get_trace
Get complete trace details by trace ID. Returns all spans with attributes, including parsed Opentelemetry data for LLM operations. Args: trace_id: Trace identifier Returns: JSON string with trace details
| Parameter | Type | Description |
|---|---|---|
trace_id * | string |
get_llm_usage
Get aggregated LLM usage metrics (token counts) for a time period. Provides breakdowns by model and service. Args: start_time: Start time in ISO 8601 format end_time: End time in ISO 8601 format service_name: Filter by service name gen_ai_system: Filter by LLM provider gen_ai_request_model: Filter by requested model name gen_ai_response_model: Filter by actual model used limit: Maximum traces to analyze (default: 1000) Returns: JSON string with usage metrics
| Parameter | Type | Description |
|---|---|---|
end_time | ||
gen_ai_request_model | ||
gen_ai_response_model | ||
gen_ai_system | ||
limit | integer | |
service_name | ||
start_time |
list_services
List all available services in the OpenTelemetry backend. Returns: JSON string with list of services
find_errors
Find traces with errors. Including detailed error messages, stack traces, and LLM-specific error information. Args: start_time: Start time in ISO 8601 format end_time: End time in ISO 8601 format service_name: Filter by service name limit: Maximum error traces to return (default: 100) Returns: JSON string with error traces
| Parameter | Type | Description |
|---|---|---|
end_time | ||
limit | integer | |
service_name | ||
start_time |
list_llm_models
List all LLM models being used with usage statistics. Discovers what models are deployed and tracks their usage patterns. Args: start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format service_name: Filter by service name gen_ai_system: Filter by LLM provider (e.g., openai, anthropic, cohere) limit: Maximum traces to analyze for model discovery (default: 1000) Returns: JSON string with list of models and their statistics (count, request_count, first_seen, last_seen)
| Parameter | Type | Description |
|---|---|---|
end_time | ||
gen_ai_system | ||
limit | integer | |
service_name | ||
start_time |
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. Args: model_name: Model name to analyze (e.g., "gpt-4", "claude-3-opus", "gpt-3.5-turbo") start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format service_name: Filter by service name Returns: JSON string with comprehensive model statistics including duration/token percentiles
| Parameter | Type | Description |
|---|---|---|
model_name * | string | |
end_time | ||
service_name | ||
start_time |
get_llm_expensive_traces
Find traces with highest LLM token usage. Useful for cost optimization and identifying inefficient prompts. Args: limit: Maximum number of traces to return (default: 10) start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format min_tokens: Minimum token count threshold (only return traces above this) service_name: Filter by service name 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") Returns: JSON string with top N mo…
| Parameter | Type | Description |
|---|---|---|
end_time | ||
gen_ai_request_model | ||
gen_ai_response_model | ||
limit | integer | |
min_tokens | ||
service_name | ||
start_time |
get_llm_slow_traces
Find slowest LLM traces by duration. Useful for performance optimization and identifying latency bottlenecks. Args: limit: Maximum number of traces to return (default: 10) start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format min_duration_ms: Minimum duration threshold in milliseconds (only return traces above this) service_name: Filter by service name 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") Returns: JSON…
| Parameter | Type | Description |
|---|---|---|
end_time | ||
gen_ai_request_model | ||
gen_ai_response_model | ||
limit | integer | |
min_duration_ms | ||
service_name | ||
start_time |
search_spans_tool
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). Args: service_name: Filter by service name operation_name: Filter by operation/span name start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format min_duration_ms: Minimum span duration in milliseconds max_duration_ms: Maximu…
| Parameter | Type | Description |
|---|---|---|
end_time | ||
filters | ||
gen_ai_request_model | ||
gen_ai_response_model | ||
gen_ai_system | ||
has_error | ||
limit | integer | |
max_duration_ms | ||
min_duration_ms | ||
operation_name | ||
service_name | ||
start_time | ||
tags |
list_llm_tools_tool
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. Args: start_time: Start time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) end_time: End time in ISO 8601 format service_name: Filter by service name gen_ai_system: Filter by LLM provider (openai, anthropic, etc.) limit: Maximum spans to analyze (default: 1000) Returns: JSON string with list of tools and their statistics (usage count, services, first/last seen)
| Parameter | Type | Description |
|---|---|---|
end_time | ||
gen_ai_system | ||
limit | integer | |
service_name | ||
start_time |