get_account
Retrieve detailed organization information using account ID or company domain to access B2B sales intelligence data.
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 retrieves account/organization details from Apollo API by ID or domain, formats the response as text.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)Registers the get_account tool in the tools list, including its name, description, and input schema.{ 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)Defines the input schema for the get_account tool, accepting id or domain.inputSchema: { type: "object", properties: { id: { type: "string", description: "Account ID", }, domain: { type: "string", description: "Company domain", }, }, },
- src/index.ts:94-95 (handler)Switch case in the main CallToolRequest handler that dispatches to the getAccount method.case "get_account": return await this.getAccount(args);