Skip to main content
Glama

search_calls

Search Gong.io sales calls using filters like date range, user IDs, or specific call IDs to find relevant conversations for analysis.

Instructions

Search for calls with various filters including date range, user IDs, and specific call IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromDateTimeNoStart date/time filter in ISO 8601 format
toDateTimeNoEnd date/time filter in ISO 8601 format
primaryUserIdsNoFilter by primary user IDs (the call hosts)
callIdsNoFilter by specific call IDs
cursorNoPagination cursor for fetching next page of results

Implementation Reference

  • Core handler function that implements the search_calls tool logic by building a filter from options (date range, users, call IDs, cursor) and calling the Gong API POST /v2/calls/extensive.
    async searchCalls(options?: { fromDateTime?: string; toDateTime?: string; workspaceId?: string; primaryUserIds?: string[]; callIds?: string[]; cursor?: string; }): Promise<CallDetailsResponse> { const body: Record<string, unknown> = { filter: {}, }; if (options?.fromDateTime) { (body.filter as Record<string, unknown>).fromDateTime = options.fromDateTime; } if (options?.toDateTime) { (body.filter as Record<string, unknown>).toDateTime = options.toDateTime; } if (options?.workspaceId) { (body.filter as Record<string, unknown>).workspaceId = options.workspaceId; } if (options?.primaryUserIds?.length) { (body.filter as Record<string, unknown>).primaryUserIds = options.primaryUserIds; } if (options?.callIds?.length) { (body.filter as Record<string, unknown>).callIds = options.callIds; } if (options?.cursor) { body.cursor = options.cursor; } return this.request<CallDetailsResponse>('POST', '/calls/extensive', body); }
  • src/index.ts:115-146 (registration)
    Registration of the search_calls tool in the MCP server's listTools handler, defining name, description, and input schema.
    { name: "search_calls", description: "Search for calls with various filters including date range, user IDs, and specific call IDs.", inputSchema: { type: "object", properties: { fromDateTime: { type: "string", description: "Start date/time filter in ISO 8601 format", }, toDateTime: { type: "string", description: "End date/time filter in ISO 8601 format", }, primaryUserIds: { type: "array", items: { type: "string" }, description: "Filter by primary user IDs (the call hosts)", }, callIds: { type: "array", items: { type: "string" }, description: "Filter by specific call IDs", }, cursor: { type: "string", description: "Pagination cursor for fetching next page of results", }, }, }, },
  • MCP CallToolRequest handler case for search_calls: delegates to GongClient.searchCalls and returns JSON-formatted result as text content.
    case "search_calls": { const result = await gong.searchCalls({ fromDateTime: args?.fromDateTime as string | undefined, toDateTime: args?.toDateTime as string | undefined, primaryUserIds: args?.primaryUserIds as string[] | undefined, callIds: args?.callIds as string[] | undefined, cursor: args?.cursor as string | undefined, }); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JustinBeckwith/gongio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server