Skip to main content
Glama

agent_run_trace_export

Return a terminal run's trace as OTLP/JSON spans with OpenTelemetry GenAI attributes (invoke_agent > chat and execute_tool). POST the otlp value to any OTLP/HTTP collector at /v1/traces (Langfuse, Datadog, Grafana Tempo, an OTel Collector). Ids are stable per run, so re-sending updates the 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": {
      "run_id": "<run_id>"
    },
    "name": "agent_run_trace_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYesTeamShared agent run UUID
include_ioNoAlso put each step's input, output and model text on its span

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does well: it reveals the external side effect (data is POSTed to a third-party collector), the terminal-run precondition, and the idempotency semantics ('Ids are stable per run, so re-sending updates the trace'). It omits any mention of collector auth headers or whether the payload can contain sensitive model text unless include_io is set.

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?

Three tight sentences ordered purpose → how to consume the output → idempotency caveat. Nothing is redundant; every clause (format, endpoint path, collector examples, stable ids) contributes actionable 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?

An output schema exists, so return-value detail is not required, yet the description still usefully explains how to use the returned otlp value. For a 2-parameter read that produces an export payload, the definition is essentially complete; only transport/auth details for the external POST are left unstated.

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%, so both run_id and include_io are already documented, giving a baseline of 3. The description restates the include_io effect rather than adding new meaning (limits, defaults, privacy implications) and says nothing extra about run_id beyond what the schema provides.

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 (return a terminal run's trace) plus the exact output format (OTLP/JSON spans with OpenTelemetry GenAI attributes) and the span hierarchy (invoke_agent > chat and execute_tool). That format specificity implicitly separates it from agent_run_trace_get and agent_export without needing to name them.

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?

Gives clear when-to-use context: after obtaining the payload, POST the otlp value to an OTLP/HTTP collector at /v1/traces, with named examples (Langfuse, Datadog, Grafana Tempo, OTel Collector). It also scopes usage to terminal runs, which excludes in-flight runs. It does not explicitly contrast with trace_get for local-only inspection, so no explicit when-not statement.

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.