get_call
Retrieve call status, duration, cost, and transcript by call ID to analyze AI voice agent performance and track telephony expenses.
Instructions
Get detailed information about a specific call including status, duration, cost, and transcript.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| call_id | Yes | The call ID |
Implementation Reference
- src/tools/calls.ts:83-93 (registration)Registration of the 'get_call' tool with server.registerTool, including name, description, input schema, and handler function
server.registerTool( "get_call", { description: "Get detailed information about a specific call including status, duration, cost, and transcript.", 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}`)) ); - src/tools/calls.ts:92-92 (handler)Handler function for get_call - executes the API GET request to /calls/{call_id}
async (params) => callTool(() => client.get(`/calls/${params.call_id}`)) - src/tools/calls.ts:85-91 (schema)Input schema definition for get_call tool using zod - requires call_id string parameter
{ description: "Get detailed information about a specific call including status, duration, cost, and transcript.", inputSchema: { call_id: z.string().describe("The call ID"), }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }, }, - src/tools/calls.ts:13-20 (helper)Helper function callTool that wraps API calls with try-catch error handling and formats results
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}`); } }