Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Search Traces

search_traces
Read-only

Search Sentry traces and spans to analyze request, endpoint, HTTP, DB, and AI/LLM latency, throughput, and slowness over time, and find spans linked to matching logs, metrics, or spans.

Instructions

Search Sentry traces and spans: requests, endpoints, HTTP and DB calls, and AI/LLM calls, for latency, throughput, and slowness over time. Also finds spans whose trace has a matching log, metric, or span. Returns individual events, counts, and aggregates; for grouped issue lists, use search_issues. For exceptions, use search_errors; for log lines, use search_logs.

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
sortNoSort field, - prefix for descending, such as -count() for aggregates. Omit unless you need a specific order.
freshNoBypass cached reads.
limitNoMaximum number of results to return.
queryNoWhat to find, in natural language or Sentry search syntax. Put environment, release, and other filters here.
fieldsNoColumns to return; omit unless you need exact columns. Include aggregates such as count() or avg() for statistics.
periodNoRelative time window, e.g. `30m`, `24h`, `7d`, `90d`.
regionUrlNo
projectSlugNo
organizationSlugNoThe organization slug, from `find_organizations`. In `org/project` notation, the part before the slash.
includeExplanationNoExplain how the query was translated or repaired.

Output Schema

NameRequiredDescriptionDefault
urlYesOpens these results in Sentry.
notesYes
queryYes
resultsYes
resultTypeYes
timeSeriesYes
explanationYes
executedSearchYes
presentationHintYes
suggestedActionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavior beyond them: it returns individual events, counts, and aggregates, and it can correlate spans to logs/metrics/spans. It does not mention pagination or result-capping behavior, so it stops short of a 5.

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?

Three sentences, front-loaded with the core purpose, then the cross-signal capability, then sibling routing. The capability enumeration is dense but each term is retrieval-relevant, with no filler; only the long list slightly slows scanning.

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 10 parameters, no required fields, an output schema, and annotations covering safety, the definition covers purpose, return kinds, and routing well. Minor gaps remain around default limits and result caps, which matter for an open-ended search tool, but nothing critical is missing.

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 coverage is 80%, so the schema already documents sort, fields, period, limit, and regionUrl semantics in detail. The description only indirectly signals aggregate usage via "throughput" and "over time"; it adds no format or syntax guidance beyond the schema's own notes on query and fields. Baseline 3 is appropriate.

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 uses a specific verb and resource ("Search Sentry traces and spans") and then enumerates the concrete event kinds it covers: requests, endpoints, HTTP/DB calls, and AI/LLM calls, plus the analytical goals (latency, throughput, slowness). It also distinguishes itself from named siblings, so an agent can select it without opening another schema.

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

Usage Guidelines5/5

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

It gives explicit routing rules: use search_issues for grouped issue lists, search_errors for exceptions, and search_logs for log lines. It also states a distinctive use case (finding spans whose trace has a matching log, metric, or span) that no sibling covers.

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