Skip to main content
Glama

enrich_person

Enrich person data and reveal contact details like email addresses and phone numbers using Apollo.io's sales intelligence platform.

Instructions

Enrich a person's information and reveal contact details.

This tool enriches person data and can reveal email addresses and phone numbers. The more information provided, the higher the match likelihood.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Implementation Reference

  • The handler function implementing the enrich_person tool logic. It uses PersonEnrichmentRequest for input validation, calls the Apollo.io /v1/people/match endpoint via POST, and handles JSON parsing, validation, and errors.
    @mcp.tool() async def enrich_person(request: Union[Dict[str, Any], str]) -> Dict[str, Any]: """ Enrich a person's information and reveal contact details. This tool enriches person data and can reveal email addresses and phone numbers. The more information provided, the higher the match likelihood. """ endpoint = "/v1/people/match" # Handle both JSON string and dict inputs if isinstance(request, str): try: request = json.loads(request) except json.JSONDecodeError as e: return {"error": f"Invalid JSON in request: {str(e)}"} # Create and validate request object from dictionary try: person_request = PersonEnrichmentRequest(**request) except Exception as e: return {"error": f"Invalid request parameters: {str(e)}"} # Convert request to dict and remove None values enrich_params = {k: v for k, v in person_request.dict().items() if v is not None} try: result = await apollo_client.make_request("POST", endpoint, data=enrich_params) 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)}"}
  • Pydantic model defining the input parameters and validation schema for the enrich_person tool.
    class PersonEnrichmentRequest(BaseModel): """Request model for person enrichment.""" first_name: Optional[str] = Field(None, description="Person's first name") last_name: Optional[str] = Field(None, description="Person's last name") email: Optional[str] = Field(None, description="Person's email address") organization_name: Optional[str] = Field(None, description="Company name") domain: Optional[str] = Field(None, description="Company domain") linkedin_url: Optional[str] = Field(None, description="LinkedIn profile URL") reveal_personal_emails: bool = Field(False, description="Whether to reveal personal emails") reveal_phone_number: bool = Field(False, description="Whether to reveal phone numbers")
  • The @mcp.tool() decorator registers the enrich_person function as an MCP tool.
    @mcp.tool()

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