Skip to main content
Glama

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
NameRequiredDescriptionDefault
idNoAccount ID
domainNoCompany domain

Implementation Reference

  • 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", }, }, }, },
  • 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", }, }, },
  • 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);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/masridigital/apollo.io-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server