get_call_transcript
Retrieve full conversation text and summaries from completed calls using a call ID to review phone discussions and extract important details.
Instructions
Get the transcript for a completed call. Returns the full conversation text and summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| call_id | Yes | The call ID |
Implementation Reference
- src/tools/calls.ts:135-145 (handler)The handler function for get_call_transcript tool. It's an async arrow function that receives params with call_id, and uses callTool helper to make a GET request to /calls/{call_id}/transcript endpoint.
server.registerTool( "get_call_transcript", { description: "Get the transcript for a completed call. Returns the full conversation text and summary.", 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}/transcript`)) ); - src/tools/calls.ts:135-145 (schema)Input schema definition for get_call_transcript using Zod validation. Defines call_id as a required string parameter with description. Also includes tool annotations (readOnlyHint: true, destructiveHint: false, idempotentHint: true).
server.registerTool( "get_call_transcript", { description: "Get the transcript for a completed call. Returns the full conversation text and summary.", 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}/transcript`)) ); - src/tools/calls.ts:135-145 (registration)Registration of the get_call_transcript tool with the MCP server using server.registerTool(). Includes tool name, description, input schema, annotations, and handler function.
server.registerTool( "get_call_transcript", { description: "Get the transcript for a completed call. Returns the full conversation text and summary.", 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}/transcript`)) ); - src/tools/calls.ts:13-20 (helper)The callTool helper function that wraps API calls with error handling. It executes the provided async function, formats successful results using toolResult(), and catches errors to return formatted error messages using toolError().
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}`); } } - src/client.ts:21-31 (helper)The BubblyPhoneClient.get() method used by the handler to make HTTP GET requests. Constructs URL with query parameters and calls the private request method with authentication headers.
async get<T = unknown>(path: string, params?: Record<string, string>): Promise<T> { const url = new URL(`${this.baseUrl}${path}`); if (params) { for (const [key, value] of Object.entries(params)) { if (value !== undefined && value !== "") { url.searchParams.set(key, value); } } } return this.request<T>(url.toString(), { method: "GET" }); }