list_calls
Retrieve Gong call records with date filtering to access metadata including ID, title, duration, and participants for sales conversation analysis.
Instructions
List Gong calls with optional date filtering. Returns call metadata including ID, title, duration, and participants.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fromDateTime | No | Start date/time filter in ISO 8601 format (e.g., 2024-01-01T00:00:00Z) | |
| toDateTime | No | End date/time filter in ISO 8601 format (e.g., 2024-01-31T23:59:59Z) | |
| cursor | No | Pagination cursor for fetching next page of results |
Implementation Reference
- src/gong.ts:312-334 (handler)Core handler function listCalls in GongClient that queries the Gong API for calls with optional date range and pagination filters.async listCalls(options?: { fromDateTime?: string; toDateTime?: string; workspaceId?: string; cursor?: string; }): Promise<CallsResponse> { const params: Record<string, string> = {}; if (options?.fromDateTime) { params.fromDateTime = options.fromDateTime; } if (options?.toDateTime) { params.toDateTime = options.toDateTime; } if (options?.workspaceId) { params.workspaceId = options.workspaceId; } if (options?.cursor) { params.cursor = options.cursor; } return this.get<CallsResponse>('/calls', params); }
- src/index.ts:157-171 (handler)MCP tool dispatch handler for 'list_calls': extracts arguments, calls gong.listCalls, and returns JSON-formatted response.case "list_calls": { const result = await gong.listCalls({ fromDateTime: args?.fromDateTime as string | undefined, toDateTime: args?.toDateTime as string | undefined, cursor: args?.cursor as string | undefined, }); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:45-68 (registration)Registers the 'list_calls' tool in the ListTools response, including name, description, and input schema.{ name: "list_calls", description: "List Gong calls with optional date filtering. Returns call metadata including ID, title, duration, and participants.", inputSchema: { type: "object", properties: { fromDateTime: { type: "string", description: "Start date/time filter in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)", }, toDateTime: { type: "string", description: "End date/time filter in ISO 8601 format (e.g., 2024-01-31T23:59:59Z)", }, cursor: { type: "string", description: "Pagination cursor for fetching next page of results", }, }, }, },
- src/gong.ts:28-37 (schema)TypeScript interface defining the structure of the API response for listCalls.export interface CallsResponse { requestId: string; records: { cursor?: string; totalRecords: number; currentPageSize: number; currentPageNumber: number; }; calls: Call[]; }