getMeetingInfo
Retrieve meeting details such as transcripts and recordings by providing a session ID, enabling AI agents to generate summaries and insights for efficient meeting analysis.
Instructions
Get information about a meeting
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The session ID to get information for |
Implementation Reference
- src/index.ts:123-167 (handler)The asynchronous handler function for the 'getMeetingInfo' tool. It fetches meeting data from the Chatterbox API using the provided sessionId, processes the transcript by formatting speaker utterances, handles errors if present in the response, and returns a structured JSON response with recording link, timestamps, and formatted transcript.async ({ sessionId }: { sessionId: string }) => { try { const response = await fetch( `${CHATTERBOX_API_ENDPOINT}/session/${sessionId}`, { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${CHATTERBOX_API_KEY}` } } ); const data = await response.json(); if(data.message) { return { content: [{ type: "text", text: data.message }], isError: true, _meta: { errorCode: "ERROR", errorMessage: data.message } }; } let transcript = ""; if(data.transcript) { transcript = data.transcript.map((utterance: any) => `${utterance.speaker}: ${utterance.text}` ).join('\n'); } else { transcript = "No transcript data available"; } return { content: [{ type: "text", text: JSON.stringify({ recordingLink: data.recordingLink, startTime: data.startTimestamp, endTime: data.endTimestamp, transcript: transcript }) }] }; } catch (error) { return handleApiError(error, "getMeetingInfo"); } }
- src/index.ts:120-122 (schema)Zod input schema for the 'getMeetingInfo' tool, defining the required 'sessionId' parameter.{ sessionId: z.string().describe("The session ID to get information for"), },
- src/index.ts:117-168 (registration)Registration of the 'getMeetingInfo' tool on the MCP server using server.tool(), specifying the tool name, description, input schema, and handler function.server.tool( "getMeetingInfo", "Get information about a meeting", { sessionId: z.string().describe("The session ID to get information for"), }, async ({ sessionId }: { sessionId: string }) => { try { const response = await fetch( `${CHATTERBOX_API_ENDPOINT}/session/${sessionId}`, { headers: { "Content-Type": "application/json", "Authorization": `Bearer ${CHATTERBOX_API_KEY}` } } ); const data = await response.json(); if(data.message) { return { content: [{ type: "text", text: data.message }], isError: true, _meta: { errorCode: "ERROR", errorMessage: data.message } }; } let transcript = ""; if(data.transcript) { transcript = data.transcript.map((utterance: any) => `${utterance.speaker}: ${utterance.text}` ).join('\n'); } else { transcript = "No transcript data available"; } return { content: [{ type: "text", text: JSON.stringify({ recordingLink: data.recordingLink, startTime: data.startTimestamp, endTime: data.endTimestamp, transcript: transcript }) }] }; } catch (error) { return handleApiError(error, "getMeetingInfo"); } } );