Skip to main content
Glama
FromSmall2Big

Apollo.io MCP Server

search_opportunities

Search and filter sales opportunities in Apollo.io to track deals and manage pipeline with customizable sorting options.

Instructions

Search for opportunities in Apollo.io.

This tool searches for sales opportunities with filtering and sorting options. Useful for tracking deals and pipeline management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
per_pageNo
account_stage_idsNo
sort_by_fieldNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'search_opportunities' tool. It is registered via the @mcp.tool() decorator and implements the logic to search Apollo.io opportunities using the API endpoint /v1/opportunities/search.
    @mcp.tool()
    async def search_opportunities(
        page: int = 1,
        per_page: int = 25,
        account_stage_ids: Optional[List[str]] = None,
        sort_by_field: Optional[str] = None
    ) -> Dict[str, Any]:
        """
        Search for opportunities in Apollo.io.
        
        This tool searches for sales opportunities with filtering and sorting options.
        Useful for tracking deals and pipeline management.
        """
        endpoint = "/v1/opportunities/search"
        
        data = {
            "page": page,
            "per_page": per_page
        }
        
        if account_stage_ids:
            data["account_stage_ids"] = account_stage_ids
        if sort_by_field:
            data["sort_by_field"] = sort_by_field
        
        try:
            result = await apollo_client.make_request("POST", endpoint, data=data)
            return result
        except httpx.HTTPStatusError as e:
            return {"error": f"API request failed: {e.response.status_code} {e.response.text}"}
        except Exception as e:
            return {"error": f"Request failed: {str(e)}"}
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions filtering and sorting capabilities, it doesn't describe important behavioral traits like whether this is a read-only operation, what permissions are required, rate limits, pagination behavior (implied by page/per_page parameters but not explained), or what the search returns. The description is too sparse for a tool with 4 parameters and no annotation coverage.

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 appropriately concise with three sentences that are front-loaded with the core purpose. Each sentence adds value: the first states what the tool does, the second elaborates on capabilities, and the third provides usage context. There's no wasted verbiage or redundancy.

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

Completeness3/5

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

Given that there's an output schema (which handles return values), no annotations, and 4 parameters with 0% schema coverage, the description is incomplete. It covers the basic purpose and some usage context but lacks parameter explanations and behavioral details needed for a search tool with filtering/sorting capabilities. The existence of an output schema prevents the lowest score, but significant gaps remain.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate by explaining parameters. It mentions 'filtering and sorting options' in general terms but doesn't specify what parameters are available, what they mean, or how they work. The four parameters (page, per_page, account_stage_ids, sort_by_field) receive no explanation in the description, leaving significant gaps in understanding.

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 tool searches for sales opportunities in Apollo.io with filtering and sorting, specifying both the verb ('searches') and resource ('sales opportunities'). It distinguishes from obvious siblings like search_accounts and search_people by focusing on opportunities rather than accounts or people, though it doesn't explicitly contrast with all siblings.

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

Usage Guidelines3/5

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

The description provides implied usage context ('Useful for tracking deals and pipeline management'), suggesting when this tool might be appropriate. However, it doesn't explicitly state when to use this versus alternatives like search_accounts or search_people, nor does it provide exclusions or prerequisites for usage.

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/FromSmall2Big/Apollo-MCP'

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