enrich_company
Retrieve company information from a domain, including industry, description, and headquarters location.
Instructions
Return all the information associated with a domain, such as the industry, the description, or headquarters' location.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes |
Implementation Reference
- main.py:32-36 (handler)The handler function for the 'enrich_company' MCP tool. It uses HunterAPIClient to fetch company information from the 'companies/find' endpoint given a domain and returns the response as a string.@mcp.tool(description="Return all the information associated with a domain, such as the industry, the description, or headquarters' location.") async def enrich_company(domain: str) -> str: async with HunterAPIClient() as client: response = await client.get("companies/find", {"domain": domain}) return response
- main.py:32-32 (registration)Registers the enrich_company tool with FastMCP using the @mcp.tool decorator, including the tool description.@mcp.tool(description="Return all the information associated with a domain, such as the industry, the description, or headquarters' location.")
- hunter_mcp/client.py:50-72 (helper)The get method of HunterAPIClient used by the enrich_company handler to perform the API request to 'companies/find'.async def get(self, endpoint: str, params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: """ Performs a GET request to the specified endpoint. Args: endpoint: endpoint path (without leading slash) params: Additional request parameters Returns: The JSON response from the API. Raises: httpx.HTTPError: In case of HTTP error """ if not self._client: raise RuntimeError("The client must be used in an async with context") response = await self._client.get( f"/{endpoint.lstrip('/')}", params=params ) response.raise_for_status() return response.json()