list_calls
Retrieve Gong call recordings and transcripts by listing calls with optional date range filtering to access details like participants, duration, and timestamps.
Instructions
List Gong calls with optional date range filtering. Returns call details including ID, title, start/end times, participants, and duration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromDateTime | No | Start date/time in ISO format (e.g. 2024-03-01T00:00:00Z) | |
| toDateTime | No | End date/time in ISO format (e.g. 2024-03-31T23:59:59Z) |
Implementation Reference
- src/index.ts:232-245 (handler)The execution handler for the 'list_calls' tool. It validates the input arguments using isGongListCallsArgs, calls the GongClient's listCalls method with the provided date range parameters, and returns the response as formatted JSON text.case "list_calls": { if (!isGongListCallsArgs(args)) { throw new Error("Invalid arguments for list_calls"); } const { fromDateTime, toDateTime } = args; const response = await gongClient.listCalls(fromDateTime, toDateTime); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], isError: false, }; }
- src/index.ts:151-167 (schema)Tool definition for 'list_calls' including name, description, and inputSchema which defines the expected input parameters (fromDateTime and toDateTime as optional strings). This serves as the schema for the tool.const LIST_CALLS_TOOL: Tool = { name: "list_calls", description: "List Gong calls with optional date range filtering. Returns call details including ID, title, start/end times, participants, and duration.", inputSchema: { type: "object", properties: { fromDateTime: { type: "string", description: "Start date/time in ISO format (e.g. 2024-03-01T00:00:00Z)" }, toDateTime: { type: "string", description: "End date/time in ISO format (e.g. 2024-03-31T23:59:59Z)" } } } };
- src/index.ts:219-221 (registration)Registration of available tools via the ListToolsRequestSchema handler, which returns the list including LIST_CALLS_TOOL.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [LIST_CALLS_TOOL, RETRIEVE_TRANSCRIPTS_TOOL], }));
- src/index.ts:128-134 (helper)GongClient helper method that makes the authenticated API request to list calls with optional date filters.async listCalls(fromDateTime?: string, toDateTime?: string): Promise<GongListCallsResponse> { const params: GongListCallsArgs = {}; if (fromDateTime) params.fromDateTime = fromDateTime; if (toDateTime) params.toDateTime = toDateTime; return this.request<GongListCallsResponse>('GET', '/calls', params); }
- src/index.ts:199-206 (schema)Type guard function for validating 'list_calls' arguments matching GongListCallsArgs interface.function isGongListCallsArgs(args: unknown): args is GongListCallsArgs { return ( typeof args === "object" && args !== null && (!("fromDateTime" in args) || typeof (args as GongListCallsArgs).fromDateTime === "string") && (!("toDateTime" in args) || typeof (args as GongListCallsArgs).toDateTime === "string") ); }