Skip to main content
Glama

Get one span

get_span
Read-only

One span in full: name, op, service, timing, status, every attribute, the errors that happened in it, and the log lines written while it ran. Take the trace_id and span_id from get_trace.

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": {
      "trace_id": "<trace_id>",
      "span_id": "<span_id>"
    },
    "name": "get_span"
  }
}

Input Schema

NameRequiredDescriptionDefault
span_idYes16-character hex span id
trace_idYes32-character hex W3C trace id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds useful content-level context — that child errors and log lines occurring during the span are included — but says nothing about truncation of large attribute sets, retention, or behavior when the span does not exist.

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 short sentences, front-loaded with what the call returns, followed by the one prerequisite an agent needs. No filler or redundant restatement of the title.

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, enumerating the returned fields is exactly the right compensation, and the ID-provenance hint closes the input side. A note on not-found/error behavior or span retention would make it fully self-contained for a read-only lookup tool.

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 baseline is 3, but the description adds provenance the schema lacks: where to obtain the trace_id and span_id. Combined with the schema's hex format constraints, an agent has both source and shape of each parameter.

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?

The description names the exact resource ('One span') and enumerates its facets — name, op, service, timing, status, attributes, errors, logs — so an agent knows this is a single-span detail fetch, not a list. It is distinguishable from get_trace, which it identifies as the source of the IDs, though the phrasing is nominative rather than a clear verb+resource statement.

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 gives a concrete precondition: take trace_id and span_id from get_trace, which routes the agent correctly through the call sequence. It stops short of stating exclusions or what to do if the span is not found.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources