Skip to main content
Glama

get_trace

Retrieve detailed trace information and performance metrics using a trace ID to debug and analyze AI agent execution within the AgentOps MCP server.

Instructions

Get trace information and metrics by trace_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trace_idYesTrace ID

Implementation Reference

  • The handler for the 'get_trace' tool. It takes a trace_id, fetches trace information and metrics from the AgentOps API endpoints, combines the results, and returns them as a JSON-formatted text response.
    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), }, ], }; }
  • src/index.ts:181-194 (registration)
    Registration of the 'get_trace' tool in the list of available tools, including its name, description, and input schema requiring a 'trace_id' string.
    { 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"], }, },
  • Input schema definition for the 'get_trace' tool, specifying an object with a required 'trace_id' property of type string.
    inputSchema: { type: "object", properties: { trace_id: { type: "string", description: "Trace ID", }, }, required: ["trace_id"], },

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