Skip to main content
Glama

ig_business_discovery

Retrieve public profile information of any Instagram Business or Creator account by username. Access fields like biography, follower counts, and media count.

Instructions

Look up another Instagram Business/Creator account's public info by username.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesInstagram username to look up (without @)
fieldsNoFields to retrieve (default: id,username,name,biography,followers_count,follows_count,media_count)

Implementation Reference

  • The handler function for 'ig_business_discovery' tool. It accepts a username (required) and optional fields, then calls the Meta Graph API using the authenticated client to do a business_discovery lookup on the given Instagram username, returning the discovered account's public info.
    // ─── ig_business_discovery ───────────────────────────────────
    server.tool(
      "ig_business_discovery",
      "Look up another Instagram Business/Creator account's public info by username.",
      {
        username: z.string().describe("Instagram username to look up (without @)"),
        fields: z.string().optional().describe("Fields to retrieve (default: id,username,name,biography,followers_count,follows_count,media_count)"),
      },
      async ({ username, fields }) => {
        try {
          const f = fields || "id,username,name,biography,followers_count,follows_count,media_count";
          const { data, rateLimit } = await client.ig("GET", `/${client.igUserId}`, {
            fields: `business_discovery.fields(${f}){username=${username}}`,
          });
          return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Business discovery failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Input schema for ig_business_discovery: 'username' (string, required) and 'fields' (string, optional) defined via Zod.
    {
      username: z.string().describe("Instagram username to look up (without @)"),
      fields: z.string().optional().describe("Fields to retrieve (default: id,username,name,biography,followers_count,follows_count,media_count)"),
    },
  • The function registerIgProfileTools registers multiple Instagram profile-related tools (including ig_business_discovery) on the MCP server via server.tool().
    export function registerIgProfileTools(server: McpServer, client: MetaClient): void {
      // ─── ig_get_profile ──────────────────────────────────────────
      server.tool(
        "ig_get_profile",
        "Get Instagram Business/Creator account profile information.",
        {},
        async () => {
          try {
            const { data, rateLimit } = await client.ig("GET", `/${client.igUserId}`, {
              fields: "id,name,username,biography,followers_count,follows_count,media_count,profile_picture_url,website",
            });
            return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
          } catch (error) {
            return { content: [{ type: "text", text: `Get profile failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
          }
        }
      );
    
      // ─── ig_get_account_insights ─────────────────────────────────
      server.tool(
        "ig_get_account_insights",
        "Get Instagram account insights. Note: 'impressions', 'email_contacts', 'phone_call_clicks', 'text_message_clicks', 'get_directions_clicks', 'website_clicks', 'profile_views' were deprecated in v22.0. Use 'views', 'reach', 'follower_count', 'reposts' instead.",
        {
          metric: z.string().describe("Comma-separated metrics: views,reach,follower_count,reposts,accounts_engaged,total_interactions"),
          period: z.enum(["day", "week", "days_28", "month", "lifetime"]).describe("Aggregation period"),
          since: z.string().optional().describe("Start date (Unix timestamp or ISO 8601)"),
          until: z.string().optional().describe("End date (Unix timestamp or ISO 8601)"),
        },
        async ({ metric, period, since, until }) => {
          try {
            const params: Record<string, unknown> = { metric, period };
            if (since) params.since = since;
            if (until) params.until = until;
            const { data, rateLimit } = await client.ig("GET", `/${client.igUserId}/insights`, params);
            return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
          } catch (error) {
            return { content: [{ type: "text", text: `Get account insights failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
          }
        }
      );
    
      // ─── ig_business_discovery ───────────────────────────────────
      server.tool(
        "ig_business_discovery",
        "Look up another Instagram Business/Creator account's public info by username.",
        {
          username: z.string().describe("Instagram username to look up (without @)"),
          fields: z.string().optional().describe("Fields to retrieve (default: id,username,name,biography,followers_count,follows_count,media_count)"),
        },
        async ({ username, fields }) => {
          try {
            const f = fields || "id,username,name,biography,followers_count,follows_count,media_count";
            const { data, rateLimit } = await client.ig("GET", `/${client.igUserId}`, {
              fields: `business_discovery.fields(${f}){username=${username}}`,
            });
            return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
          } catch (error) {
            return { content: [{ type: "text", text: `Business discovery failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
          }
        }
      );
    
      // ─── ig_get_collaboration_invites ────────────────────────────
      server.tool(
        "ig_get_collaboration_invites",
        "Get pending collaboration invites for the Instagram account. Added in December 2025.",
        {
          limit: z.number().optional().describe("Number of results"),
          after: z.string().optional().describe("Pagination cursor"),
        },
        async ({ limit, after }) => {
          try {
            const params: Record<string, unknown> = {};
            if (limit) params.limit = limit;
            if (after) params.after = after;
            const { data, rateLimit } = await client.ig("GET", `/${client.igUserId}/collaboration_invites`, params);
            return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
          } catch (error) {
            return { content: [{ type: "text", text: `Get collaboration invites failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
          }
        }
      );
    
      // ─── ig_respond_collaboration_invite ─────────────────────────
      server.tool(
        "ig_respond_collaboration_invite",
        "Accept or decline a collaboration invite. Added in December 2025.",
        {
          invite_id: z.string().describe("Collaboration invite ID"),
          action: z.enum(["accept", "decline"]).describe("Accept or decline the invite"),
        },
        async ({ invite_id, action }) => {
          try {
            const { data, rateLimit } = await client.ig("POST", `/${client.igUserId}/collaboration_invites`, {
              invite_id,
              action,
            });
            return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
          } catch (error) {
            return { content: [{ type: "text", text: `Respond to collaboration invite failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
          }
        }
      );
    }
  • src/index.ts:15-15 (registration)
    Import of registerIgProfileTools from the profile module.
    import { registerIgProfileTools } from "./tools/instagram/profile.js";
  • src/index.ts:45-45 (registration)
    Actual registration call: registerIgProfileTools(server, client) wires up all Instagram profile tools including ig_business_discovery.
    registerIgProfileTools(server, client);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states a read operation ('Look up'), but does not disclose any behavioral traits such as rate limits, authentication requirements, or side effects. The minimal information is not insufficient for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, highly concise, front-loaded with verb and resource. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple lookup tool with no output schema, the description is adequate but minimal. It lacks usage context, response format, or caveats. Given many sibling tools, more completeness would help, but basic purpose is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds no extra meaning beyond the schema. It mentions 'by username', but that is already in the schema's description for the username parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (look up), resource (another Instagram Business/Creator account's public info), and method (by username). It distinguishes from sibling tools like ig_get_profile, which is for the authenticated user's profile.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies looking up other accounts, not your own, but does not explicitly state when to use this tool versus alternatives like ig_get_profile or ig_get_media_list. No exclusion or alternative guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/mikusnuz/meta-mcp'

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