get_account_by_id
Retrieve comprehensive account information including contact details, custom fields, and associated personas by providing a specific account ID.
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 handler function implementing the 'get_account_by_id' MCP tool. It makes a GET request to the Apollo.io API endpoint /v1/accounts/{account_id} using the shared ApolloAPIClient instance and handles errors appropriately.@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)}"}