get_account
Retrieve detailed organization information using company ID or domain to support B2B sales intelligence and prospect research.
Instructions
Get detailed information about an account/organization by ID or domain.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Account ID | |
| domain | No | Company domain |
Implementation Reference
- src/index.ts:1140-1177 (handler)The handler function that implements the core logic of the 'get_account' tool. It fetches account information from Apollo.io API either by ID or by searching with domain, formats the details into a text response, and handles the case where no account is found.private async getAccount(args: any) { const endpoint = args.id ? `/accounts/${args.id}` : `/accounts/search?q_organization_domains[]=${args.domain}`; const response = await this.axiosInstance.get(endpoint); const account = args.id ? response.data.account : response.data.accounts?.[0]; if (!account) { return { content: [ { type: "text", text: "Account not found.", }, ], }; } let result = `Account Details:\n\n`; result += `Name: ${account.name}\n`; result += `ID: ${account.id}\n`; result += `Domain: ${account.domain || account.website_url || "N/A"}\n`; result += `Industry: ${account.industry || "N/A"}\n`; result += `Employees: ${account.estimated_num_employees || "N/A"}\n`; result += `Phone: ${account.phone || "N/A"}\n`; return { content: [ { type: "text", text: result, }, ], }; }
- src/index.ts:543-560 (registration)The tool registration in the getTools() method, including name, description, and input schema. This defines how the tool is exposed to the MCP server.{ name: "get_account", description: "Get detailed information about an account/organization by ID or domain.", inputSchema: { type: "object", properties: { id: { type: "string", description: "Account ID", }, domain: { type: "string", description: "Company domain", }, }, }, },
- src/index.ts:547-559 (schema)The input schema defining the parameters for the get_account tool: optional id (string) or domain (string).inputSchema: { type: "object", properties: { id: { type: "string", description: "Account ID", }, domain: { type: "string", description: "Company domain", }, }, },
- src/index.ts:94-95 (handler)Dispatch case in the central tool handling method that routes 'get_account' calls to the specific getAccount handler.case "get_account": return await this.getAccount(args);