Skip to main content
Glama
AgentOps-AI

AgentOps MCP

Official
by AgentOps-AI

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"],
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets' information, implying a read operation, but doesn't specify whether this requires authentication, has rate limits, returns structured data, or has any side effects. The description is minimal and lacks important operational context.

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?

The description is extremely concise - a single sentence that directly states the tool's purpose without any wasted words. It's front-loaded with the core functionality and appropriately sized for a simple retrieval tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'trace information and metrics' includes, the format of the return data, error conditions, or how this differs from sibling tools. The agent would need to guess about the tool's behavior and output.

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%, with the single parameter 'trace_id' clearly documented in the schema. The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline for adequate but unenhanced parameter documentation.

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 clearly states the tool's purpose with a specific verb ('Get') and resource ('trace information and metrics'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_complete_trace' or 'get_span', which appear to be related trace/span retrieval operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_complete_trace' or 'get_span'. It doesn't mention prerequisites, constraints, or comparative use cases, leaving the agent to infer usage from tool names alone.

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

Install Server

Other 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