Skip to main content
Glama

get_complete_trace

Retrieve full trace details and metrics using a specific trace_id to debug and analyze AI agent performance in AgentOps MCP.

Instructions

Reserved for explicit requests for COMPLETE or ALL data. Get complete trace information and metrics by trace_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trace_idYesTrace ID

Implementation Reference

  • Handler for the 'get_complete_trace' tool. Fetches trace info and metrics, then recursively fetches full span info and metrics for each span in the trace.
    case "get_complete_trace": { const { trace_id } = args as { trace_id: string }; const [traceInfo, traceMetrics] = await Promise.all([ makeAuthenticatedRequest(`/public/v1/traces/${trace_id}`), makeAuthenticatedRequest(`/public/v1/traces/${trace_id}/metrics`), ]); const parentTrace = { ...traceInfo, metrics: traceMetrics }; if (parentTrace.spans && Array.isArray(parentTrace.spans)) { for (let i = 0; i < parentTrace.spans.length; i++) { if (parentTrace.spans[i].span_id) { const span_id = parentTrace.spans[i].span_id; const [childSpanInfo, childSpanMetrics] = await Promise.all([ makeAuthenticatedRequest(`/public/v1/spans/${span_id}`), makeAuthenticatedRequest(`/public/v1/spans/${span_id}/metrics`), ]); parentTrace.spans[i] = { ...childSpanInfo, metrics: childSpanMetrics, }; } } } return { content: [ { type: "text", text: JSON.stringify(parentTrace, null, 2), }, ], }; }
  • src/index.ts:209-223 (registration)
    Registration of the 'get_complete_trace' tool in the listTools response, including input schema.
    { name: "get_complete_trace", description: "Reserved for explicit requests for COMPLETE or ALL data. Get complete trace information and metrics by trace_id.", inputSchema: { type: "object", properties: { trace_id: { type: "string", description: "Trace ID", }, }, required: ["trace_id"], }, },
  • Input schema for the 'get_complete_trace' tool.
    inputSchema: { type: "object", properties: { trace_id: { type: "string", description: "Trace ID", }, }, required: ["trace_id"], },

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AgentOps-AI/agentops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server