Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Get Span Details

get_span_details
Read-only

Retrieve a single Sentry trace span by trace ID and span ID to inspect its attributes, timing, errors, and child spans; use trace-level details for a full trace overview.

Instructions

Get one span in a Sentry trace by trace ID and span ID: its attributes, timing, errors, and child spans. For a whole-trace overview, use get_trace_details.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "traceId": "<traceId>",
      "spanId": "<spanId>"
    },
    "name": "get_span_details"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNoBypass cached reads.
spanIdYesA span ID in the trace.
traceIdYesThe 32-character hex trace ID.
regionUrlNo
organizationSlugNoThe organization slug, from `find_organizations`. In `org/project` notation, the part before the slash.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds value beyond that by disclosing the payload shape (attributes, timing, errors, child spans), which matters because there is no output schema. It stops short of covering cache/freshness behavior (left to the schema's `fresh` param) or how large child-span trees are returned, so it is not a full 5.

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?

Two sentences, front-loaded with the operation and its return contents, followed immediately by the disambiguation. There is no redundant restatement of the title and every clause earns its place.

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?

For a simple two-required-parameter read tool with no output schema, the description covers what the tool does, what comes back, and which sibling to use instead. Minor gaps remain around not-found behavior and child-span depth/truncation, but nothing an agent needs in order to call it correctly 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 description coverage is 80%, with `traceId`, `spanId`, `fresh`, `regionUrl` and `organizationSlug` all documented in the schema itself. The description only restates the trace-ID/span-ID pairing needed to identify a span and adds no syntax, format, or edge-case guidance beyond that. Baseline 3 is appropriate when the schema carries the parameter burden.

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 and resource ("Get one span in a Sentry trace"), names the two identifying keys, and enumerates what the response contains ("attributes, timing, errors, and child spans"). It also explicitly distinguishes itself from the sibling get_trace_details, so an agent can route correctly without opening either 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?

The second sentence gives an explicit alternative and the condition that selects it: "For a whole-trace overview, use get_trace_details." The scope boundary between single-span and whole-trace access is fully named rather than left to inference.

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