retrieve_transcripts
Retrieve detailed call transcripts with speaker identification, topics, and timestamped sentences for analysis and review.
Instructions
Retrieve transcripts for specified call IDs. Returns detailed transcripts including speaker IDs, topics, and timestamped sentences.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| callIds | Yes | Array of Gong call IDs to retrieve transcripts for |
Implementation Reference
- src/index.ts:247-260 (handler)MCP CallToolRequest handler case for 'retrieve_transcripts': validates arguments using isGongRetrieveTranscriptsArgs, extracts callIds, calls gongClient.retrieveTranscripts, and returns JSON response.case "retrieve_transcripts": { if (!isGongRetrieveTranscriptsArgs(args)) { throw new Error("Invalid arguments for retrieve_transcripts"); } const { callIds } = args; const response = await gongClient.retrieveTranscripts(callIds); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false, }; }
- src/index.ts:169-183 (registration)Definition of the RETRIEVE_TRANSCRIPTS_TOOL Tool object, including name, description, and inputSchema. This is registered in the list tools handler.const RETRIEVE_TRANSCRIPTS_TOOL: Tool = { name: "retrieve_transcripts", description: "Retrieve transcripts for specified call IDs. Returns detailed transcripts including speaker IDs, topics, and timestamped sentences.", inputSchema: { type: "object", properties: { callIds: { type: "array", items: { type: "string" }, description: "Array of Gong call IDs to retrieve transcripts for" } }, required: ["callIds"] } };
- src/index.ts:208-216 (schema)Type guard function to validate input arguments for retrieve_transcripts tool.function isGongRetrieveTranscriptsArgs(args: unknown): args is GongRetrieveTranscriptsArgs { return ( typeof args === "object" && args !== null && "callIds" in args && Array.isArray((args as GongRetrieveTranscriptsArgs).callIds) && (args as GongRetrieveTranscriptsArgs).callIds.every(id => typeof id === "string") ); }
- src/index.ts:136-145 (helper)GongClient method that performs the HTTP POST request to Gong API to retrieve transcripts for given callIds.async retrieveTranscripts(callIds: string[]): Promise<GongRetrieveTranscriptsResponse> { return this.request<GongRetrieveTranscriptsResponse>('POST', '/calls/transcript', undefined, { filter: { callIds, includeEntities: true, includeInteractionsSummary: true, includeTrackers: true } }); }
- src/index.ts:60-72 (schema)TypeScript interfaces defining the request arguments and response structure for retrieve_transcripts.interface GongRetrieveTranscriptsResponse { transcripts: GongTranscript[]; } interface GongListCallsArgs { [key: string]: string | undefined; fromDateTime?: string; toDateTime?: string; } interface GongRetrieveTranscriptsArgs { callIds: string[]; }