Skip to main content
Glama

get_call_events

Read-onlyIdempotent

Retrieve millisecond-precision call event logs to debug call flow issues and diagnose communication problems.

Instructions

Get the detailed event log for a call with millisecond-precision timestamps. Useful for debugging call flow issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
call_idYesThe call ID

Implementation Reference

  • The handler function for get_call_events tool. It receives params with call_id and makes an API GET request to /calls/{call_id}/events via the client.
      async (params) => callTool(() => client.get(`/calls/${params.call_id}/events`))
    );
  • Registration of the get_call_events tool with name, description, input schema (call_id string), and annotations (read-only, non-destructive, idempotent).
    server.registerTool(
      "get_call_events",
      {
        description: "Get the detailed event log for a call with millisecond-precision timestamps. Useful for debugging call flow issues.",
        inputSchema: {
          call_id: z.string().describe("The call ID"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
      },
      async (params) => callTool(() => client.get(`/calls/${params.call_id}/events`))
    );
  • The callTool helper that wraps API calls with try/catch error handling. On success returns toolResult with JSON data, on failure returns toolError with API error details.
    async function callTool<T>(fn: () => Promise<T>) {
      try {
        return toolResult(await fn());
      } catch (err) {
        const apiErr = err as ApiError;
        return toolError(`API error (${apiErr.status}): ${apiErr.message}`);
      }
    }
  • Helper functions toolError and toolResult that format tool responses with content array for MCP protocol.
    function toolError(message: string) {
      return { content: [{ type: "text" as const, text: message }], isError: true };
    }
    
    function toolResult(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
Behavior4/5

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

While annotations establish the read-only, non-destructive, idempotent nature of the call, the description adds valuable behavioral context about data characteristics: 'detailed event log' implies structured temporal data, and 'millisecond-precision timestamps' specifies granularity not indicated elsewhere.

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?

Two sentences with zero waste: first sentence front-loads the core capability and key technical detail (millisecond precision), second sentence provides the use case (debugging). Every word earns its place.

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

Completeness4/5

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

For a single-parameter read operation with strong annotations, the description is sufficiently complete. It explains what the tool returns (detailed event log) despite lacking an output schema. Minor gap: could briefly indicate expected return structure (array of events).

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?

With 100% schema description coverage ('The call ID'), the schema fully documents the single parameter. The description implicitly references the target resource ('for a call') but does not add syntax details, format constraints, or examples beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get'), resource ('detailed event log for a call'), and distinguishing characteristic ('millisecond-precision timestamps'). It effectively differentiates from siblings like get_call (likely basic metadata) and get_call_transcript (audio/text content) by specifying 'event log' format.

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?

Provides clear usage context ('Useful for debugging call flow issues') that establishes when to invoke this tool. However, it lacks explicit guidance on when NOT to use it or named alternatives (e.g., distinguishing from get_call for basic retrieval).

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/JobXDubai/mcp-server'

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