get_account_by_id
Retrieve detailed account information from Apollo.io using a specific account ID to access contact data, custom fields, and associated personas for sales and marketing activities.
Instructions
Retrieve detailed information for a specific account by ID.
This tool fetches comprehensive account data including contact information, custom fields, and associated personas.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes |
Implementation Reference
- src/apollo_mcp_server.py:280-297 (handler)The primary handler function for the 'get_account_by_id' tool. It is decorated with @mcp.tool() which registers it with the FastMCP server. The function retrieves account details from the Apollo.io API by making a GET request to /v1/accounts/{account_id} using the shared ApolloAPIClient instance.@mcp.tool() async def get_account_by_id(account_id: str) -> Dict[str, Any]: """ Retrieve detailed information for a specific account by ID. This tool fetches comprehensive account data including contact information, custom fields, and associated personas. """ endpoint = f"/v1/accounts/{account_id}" try: result = await apollo_client.make_request("GET", endpoint) 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)}"}