Skip to main content
Glama

Correlate Trace

correlate_trace
Read-onlyIdempotent

Match a trace from one backend to a corresponding trace in another independent backend, using exact trace ID first, then falling back to time-window and service-name overlap heuristics.

Instructions

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 any backend-specific fields) environment variables; raises a clear error otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trace_idYesTrace identifier, as known to the primary (already configured) backend.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesYes
limitationsYes
primary_trace_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.2

TDQS

A4.5/5.0
Behavior5/5

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

The description thoroughly discloses behavior beyond annotations: the direct-match-first strategy with confidence levels, the fallback heuristic search, the best-effort nature, the presence of a `limitations` field, and the clear error if configuration is missing. This is far richer than the readOnly/openWorld/idempotent annotations alone. No contradiction.

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

Conciseness5/5

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

The description is front-loaded with the core purpose and flows logically into matching strategy, caveats, and configuration requirements. Every sentence earns its place; the length is justified by the important behavioral and environmental details it conveys.

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

Completeness5/5

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

For a single-parameter, read-only, idempotent tool with an output schema, the description covers everything needed: input semantics, matching algorithm, confidence, limitations, and prerequisites. No critical gap remains.

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%, and the schema already explains trace_id as 'Trace identifier, as known to the primary (already configured) backend.' The description repeats this meaning without adding new parameter-level detail, so it meets the baseline but adds no extra semantic value.

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?

The description states the specific action ('find the corresponding trace in a second, independently-configured backend') and the input ('a trace_id known to the primary backend'). It clearly distinguishes this tool from siblings like get_trace or search_traces by emphasizing cross-backend correlation and the join use case.

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?

It provides clear context for when to use the tool: given a trace_id from the primary backend and a need to find the matching trace in a secondary backend. It also gives a concrete example (Datadog trace joined with Sentry error) and states prerequisites (secondary backend configured via environment variables), though it doesn't explicitly name sibling tools to exclude.

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