Skip to main content
Glama
masridigital

Apollo.io MCP Server

by masridigital

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

Implementation Reference

  • 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",
          },
        },
      },
    },
  • 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",
        },
      },
    },
  • Switch case in the main CallToolRequest handler that dispatches to the getAccount method.
    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