Skip to main content
Glama

get_trace

Retrieve detailed trace information and metrics using a trace ID to debug and analyze complex AI agent runs, providing insights into success or failure points.

Instructions

Get trace information and metrics by trace_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trace_idYesTrace ID

Implementation Reference

  • Handler for the 'get_trace' tool. Extracts trace_id from arguments, fetches trace information and metrics via authenticated API calls to AgentOps, combines them, and returns as formatted JSON.
    case "get_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 result = { ...traceInfo, metrics: traceMetrics }; return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Input schema for 'get_trace' tool, defining trace_id as a required string.
    inputSchema: { type: "object", properties: { trace_id: { type: "string", description: "Trace ID", }, }, required: ["trace_id"], }, },
  • src/index.ts:182-194 (registration)
    Registration of the 'get_trace' tool in the ListTools response, including name, description, and input schema.
    name: "get_trace", description: "Get trace information and metrics by trace_id.", 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