get_meeting_transcript
Retrieve meeting transcripts by providing the bot ID from the Attendee MCP Server, enabling users to access and review meeting conversations efficiently.
Instructions
Get the transcript from a meeting bot
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bot_id | Yes | ID of the bot whose transcript to retrieve |
Implementation Reference
- src/index.ts:489-506 (handler)The handler function that executes the tool: validates bot_id, fetches transcript data from the API endpoint `/api/v1/bots/${bot_id}/transcript`, formats it using formatTranscriptResponse, and returns it as MCP content.private async getMeetingTranscript(args: Record<string, unknown>) { const bot_id = args.bot_id as string; if (!bot_id || typeof bot_id !== 'string') { throw new Error("Missing or invalid required parameter: bot_id"); } const data = await this.makeApiRequest(`/api/v1/bots/${bot_id}/transcript`); return { content: [ { type: "text", text: this.formatTranscriptResponse(data, bot_id), }, ], }; }
- src/index.ts:241-250 (schema)Defines the input schema for the tool, requiring a 'bot_id' string.inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot whose transcript to retrieve", }, }, required: ["bot_id"], },
- src/index.ts:238-251 (registration)Registers the tool in the list returned by ListToolsRequestSchema, including name, description, and input schema.{ name: "get_meeting_transcript", description: "Get the transcript from a meeting bot", inputSchema: { type: "object", properties: { bot_id: { type: "string", description: "ID of the bot whose transcript to retrieve", }, }, required: ["bot_id"], }, },
- src/index.ts:404-405 (registration)Registers the handler dispatch in the CallToolRequestSchema switch statement.case "get_meeting_transcript": return await this.getMeetingTranscript(args);
- src/index.ts:142-183 (helper)Helper function that formats the raw transcript data (array or object) into a user-readable string with timestamps and speaker names.private formatTranscriptResponse(data: any, botId: string): string { // If data is an array, it means we got the transcript entries directly if (Array.isArray(data)) { if (data.length === 0) { return `❌ No transcript available for bot ${botId}`; } let transcript = `📝 Meeting Transcript for bot ${botId}:\n\n`; transcript += "─".repeat(50) + "\n"; data.forEach((entry: any) => { const timestamp = entry.timestamp_ms / 1000; const minutes = Math.floor(timestamp / 60); const seconds = Math.floor(timestamp % 60); const timeStr = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`; transcript += `[${timeStr}] ${entry.speaker_name}:\n${entry.transcription}\n\n`; }); transcript += "─".repeat(50) + `\n📊 Total entries: ${data.length}`; return transcript; } // Handle object response (legacy format) if (data.ready && data.transcript) { return [ `📝 Meeting Transcript for bot ${botId}:`, "", "─".repeat(50), data.transcript, "─".repeat(50), ].join("\n"); } else { const stateIcon = data.transcription_state === "in_progress" ? "🔄" : "⏳"; return [ `${stateIcon} Transcript not ready for bot ${botId}`, `Current transcription state: ${data.transcription_state}`, "", "💡 The transcript will be available after the meeting ends and processing completes.", ].join("\n"); } }