enrich_organization
Enrich company data by domain to obtain detailed organization information including industry, employee count, and contact details.
Instructions
Enrich organization/company information.
This tool enriches company data based on domain, returning detailed information about the organization including industry, employee count, contact info, and more.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"request": "<request>"
},
"name": "enrich_organization"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/apollo_mcp_server.py:223-255 (handler)The main handler function for the 'enrich_organization' tool, decorated with @mcp.tool() for registration. It parses the request, validates using OrganizationEnrichmentRequest schema, calls the Apollo.io /v1/organizations/enrich API endpoint, and returns the enriched organization data or error.
@mcp.tool() async def enrich_organization(request: Union[Dict[str, Any], str]) -> Dict[str, Any]: """ Enrich organization/company information. This tool enriches company data based on domain, returning detailed information about the organization including industry, employee count, contact info, and more. """ endpoint = "/v1/organizations/enrich" # 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: org_request = OrganizationEnrichmentRequest(**request) except Exception as e: return {"error": f"Invalid request parameters: {str(e)}"} params = {"domain": org_request.domain} try: result = await apollo_client.make_request("GET", endpoint, params=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)}"} - src/apollo_mcp_server.py:112-114 (schema)Pydantic model defining the input schema for the enrich_organization tool, requiring a 'domain' field.
class OrganizationEnrichmentRequest(BaseModel): """Request model for organization enrichment.""" domain: str = Field(..., description="Company domain to enrich")