Skip to main content
Glama
AgentOps-AI

AgentOps MCP

Official
by AgentOps-AI

get_complete_trace

Retrieve full trace data and metrics using a trace ID to debug AI agent runs by analyzing complete execution details.

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

  • The handler for the 'get_complete_trace' tool. It fetches the trace information and metrics, then recursively fetches complete span information and metrics for all child spans, and returns the full trace as JSON.
    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)
    Registers the 'get_complete_trace' tool in the list of available tools, including its name, description, and 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"],
      },
    },
  • Defines the input schema for the 'get_complete_trace' tool, requiring a 'trace_id' 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?

No annotations are provided, so the description carries full burden. It mentions retrieving 'complete trace information and metrics,' which implies a read-only operation, but doesn't disclose behavioral traits like authentication requirements, rate limits, response format, or potential performance implications of fetching 'ALL data.' The description adds minimal behavioral context beyond the basic purpose.

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 appropriately sized and front-loaded, with two concise sentences that directly state the tool's purpose and usage context. Every sentence earns its place by providing essential information without redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given the tool's complexity (simple single-parameter query), lack of annotations, and no output schema, the description is minimally complete. It covers purpose and usage but lacks details on behavior, response format, or error handling. For a tool with no structured safety or output information, more contextual detail would be beneficial.

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?

The schema description coverage is 100%, with the single parameter 'trace_id' fully documented in the schema. The description adds no additional meaning beyond what the schema provides, as it only repeats 'by trace_id' without explaining format, constraints, or examples. With high schema coverage, the baseline score of 3 is appropriate.

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 specific verbs ('Get complete trace information and metrics') and identifies the resource ('by trace_id'). It distinguishes from siblings by emphasizing 'COMPLETE or ALL data' versus likely partial data from get_span or get_trace. However, it doesn't explicitly name the siblings for comparison.

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?

The description provides clear context for when to use this tool: 'Reserved for explicit requests for COMPLETE or ALL data.' This implies it should be used when full trace data is needed rather than partial information. It doesn't explicitly name alternatives or state when not to use it, but the context is sufficiently clear.

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