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),
          },
        ],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions filtering capabilities but doesn't disclose behavioral traits like pagination (though cursor parameter hints at it), rate limits, authentication needs, response format, or whether it's read-only/destructive. The description is minimal and lacks operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy but could be more structured by explicitly separating filter types or adding brief usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on response format, pagination behavior, error conditions, and how filters combine. Given the complexity and absence of structured metadata, more comprehensive guidance is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds marginal value by summarizing filter types (date range, user IDs, call IDs) but doesn't provide additional syntax, constraints, or examples beyond what's in the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Search for') and resource ('calls'), and lists key filter types (date range, user IDs, call IDs). It distinguishes from 'get_call_details' (specific call) and 'get_transcripts' (transcript content), but doesn't explicitly differentiate from 'list_calls' which might also list calls with filters.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list_calls' or 'get_call_details'. It mentions filter types but doesn't specify prerequisites, limitations, or comparative use cases with sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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