list_calls
Retrieve Gong call details including ID, title, timings, participants, and duration. Filter results by date range using ISO format for start and end times.
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)Executes the list_calls tool: validates arguments with isGongListCallsArgs, calls gongClient.listCalls, and returns JSON-formatted response.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:154-166 (schema)JSON Schema for list_calls input: optional fromDateTime and toDateTime strings in ISO format.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:151-167 (registration)Tool object definition for list_calls, including name, description, and input schema.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)Registers list_calls tool by including LIST_CALLS_TOOL in the tools list returned by ListToolsRequest handler.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [LIST_CALLS_TOOL, RETRIEVE_TRANSCRIPTS_TOOL], }));
- src/index.ts:128-134 (helper)GongClient method implementing the API call 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); }