Skip to main content
Glama
mackerelio-labs

Mackerel MCP Server

Official

Get Trace

get_trace
Read-only

Retrieve trace data from Mackerel by trace ID to analyze performance bottlenecks, debug latency, and investigate error propagation across microservices.

Instructions

Retrieve trace data by trace ID from Mackerel for distributed tracing analysis.

šŸ” USE THIS TOOL WHEN USERS:

  • Analyze performance bottlenecks in distributed systems

  • Investigate error propagation across microservices

  • Understand request flow and service dependencies

  • Debug latency issues and identify slow operations

  • Generate documentation of system architecture from trace data

Focus on errors only

get_trace(traceId="abc123def456", errorSpansOnly=true)

Filter spans with duration over 100ms

get_trace(traceId="abc123def456", duration=100)

Detailed analysis with attributes

get_trace(traceId="abc123def456", includeAttributes=true, limit=50)

Minimal view for overview

get_trace(traceId="abc123def456", includeEvents=false, limit=10)

Pagination through large traces

get_trace(traceId="abc123def456", limit=20, offset=0)  # First page
get_trace(traceId="abc123def456", limit=20, offset=20) # Second page

Combined filtering and pagination

get_trace(traceId="abc123def456", errorSpansOnly=true, limit=10, offset=0)

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of spans to return per page (default: 20, max: 100)
offsetNoNumber of spans to skip (default: 0)
traceIdYesThe ID of the trace to retrieve
durationNoOnly return spans with duration (in milliseconds) equal to or greater than this value. Useful for identifying bottlenecks
includeEventsNoWhether to include span events. Default is true as events contain important error information
errorSpansOnlyNoIf true, only return spans that have errors or status code indicating failure
includeAttributesNoWhether to include span attributes. Default is false to reduce response size

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries the rest and does add value: pagination via limit/offset, default page size of 20 with a max of 100, and the rationale that includeAttributes defaults false to reduce response size while includeEvents defaults true because events carry error information. It doesn't describe the shape of the returned spans, which would round it out.

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

Conciseness3/5

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

The lead sentence and USE-WHEN block are well front-loaded, but seven examples is more than needed: the 'combined filtering and pagination' example merely recombines behaviors already demonstrated separately, and every example repeats the same placeholder traceId, adding length without new information.

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

Completeness4/5

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

With no output schema, the description should say what comes back; it implies pages of spans and mentions events/attributes but never sketches the span record or whether total counts are returned. Everything needed to invoke correctly is present, so the gap is modest rather than disqualifying.

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%, so the baseline is 3, but the examples add real semantic guidance the schema lacks: duration is expressed in milliseconds and compared as a floor (duration=100 = spans over 100ms), and errorSpansOnly combined with limit/offset is shown for paged error triage.

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?

States a specific verb+resource ('Retrieve trace data by trace ID from Mackerel') and the analysis domain (distributed tracing), which cleanly separates it from the list_traces sibling that returns collections rather than a single trace.

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

Usage Guidelines4/5

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

The 'USE THIS TOOL WHEN USERS' block gives five concrete scenarios (bottleneck analysis, error propagation, request flow, latency debugging, architecture docs) plus worked examples. It never names the alternative for enumerating traces (list_traces) or states when NOT to use this tool, so it stops short of a 5.

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