Skip to main content
Glama
OpenTelemetry MCP Server

OpenTelemetry MCP Server

by traceloop

Search Traces

search_traces

Search OpenTelemetry traces with service, time, duration, error, tag, and model filters to debug LLM or distributed systems and analyze token usage.

Instructions

Search for OpenTelemetry traces with filters.

Supports both simple parameters and advanced generic filter system.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_traces"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoAdditional tag filters as key-value pairs
limitNoMaximum number of traces to return (1-1000, default: 100)
filtersNoGeneric 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, lt, gte, lte, contains, not_contains, starts_with, ends_with, in, not_in, between, exists, not_exists) - value: Single value for most operators - values: List of values for "in", "not_in", "between" operators - value_type: Type of value(s) - "string", "number", or "boolean"
end_timeNoEnd time in ISO 8601 format
has_errorNoFilter traces with errors
start_timeNoStart time in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
service_nameNoFilter by service name (use filters for advanced queries)
gen_ai_systemNoFilter by LLM provider (e.g., openai, anthropic)
operation_nameNoFilter by operation/span name
max_duration_msNoMaximum trace duration in milliseconds
min_duration_msNoMinimum trace duration in milliseconds
gen_ai_request_modelNoFilter by requested model name (e.g., gpt-4)
gen_ai_response_modelNoFilter by actual model used (e.g., gpt-4-0613)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden and it discloses almost nothing behavioral: no statement that this is a read-only query, no result ordering, no statement about how `filters` interacts with simple params (AND vs override), and no note on result caps beyond the schema's `limit`. The output schema covers return shape, which limits the damage, but the interaction semantics between the two filtering systems are left undefined.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, purpose front-loaded, zero filler. It is arguably too terse for a 13-parameter tool, but there is no wasted wording to cut.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 13 optional parameters, no annotations, and an output schema, the description is minimally adequate: schema docs cover each field and the output schema covers returns. What is missing is anything an agent needs in order to choose between this and search_spans_tool/find_errors, plus the interaction rules between simple and generic filters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description's only added framing is the simple-vs-generic duality, and it does not clarify precedence when both `service_name` (whose schema text says 'use filters for advanced queries') and `filters` are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search for OpenTelemetry traces') with the scoping notion of filters. It does not differentiate itself from siblings such as search_spans_tool, find_errors, or get_trace, so the agent must infer trace-vs-span and search-vs-fetch semantics on its own.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The line 'Supports both simple parameters and advanced generic filter system' implies that simple params cover common cases and `filters` covers the rest, which is mild usage guidance. There is no explicit when-to-use, when-not-to-use, or pointer to the sibling tools for spans, errors, or single-trace retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.