Skip to main content
Glama

meta_subscribe_webhook

Subscribe to real-time webhook notifications for Meta platform objects like Instagram pages or users. Configure HTTPS endpoints to receive updates on messages, feed changes, and other specified fields.

Instructions

Subscribe to webhook notifications for an object (e.g., 'instagram', 'page'). Requires META_APP_ID and META_APP_SECRET.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectYesObject type to subscribe to
callback_urlYesHTTPS webhook endpoint URL
verify_tokenYesVerification token for the webhook
fieldsYesComma-separated list of fields to subscribe (e.g., 'messages,feed')

Implementation Reference

  • The `meta_subscribe_webhook` tool is registered and implemented within `src/tools/meta/auth.ts` using the `server.tool` method. It takes an object, callback_url, verify_token, and fields as arguments and calls the Meta API's `/app/subscriptions` endpoint via the provided `client`.
    // ─── meta_subscribe_webhook ──────────────────────────────────
    server.tool(
      "meta_subscribe_webhook",
      "Subscribe to webhook notifications for an object (e.g., 'instagram', 'page'). Requires META_APP_ID and META_APP_SECRET.",
      {
        object: z.enum(["instagram", "page", "user", "permissions"]).describe("Object type to subscribe to"),
        callback_url: z.string().url().describe("HTTPS webhook endpoint URL"),
        verify_token: z.string().describe("Verification token for the webhook"),
        fields: z.string().describe("Comma-separated list of fields to subscribe (e.g., 'messages,feed')"),
      },
      async ({ object, callback_url, verify_token, fields }) => {
        try {
          const { data, rateLimit } = await client.meta("POST", `/app/subscriptions`, {
            object,
            callback_url,
            verify_token,
            fields,
          });
          return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Webhook subscribe failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool creates a subscription (implying a write operation) and mentions authentication requirements, but lacks details on rate limits, error handling, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness4/5

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

The description is brief and front-loaded with the core purpose. The second sentence about requirements is necessary but could be more integrated. Overall, it's efficient with minimal waste, though not perfectly structured.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, or behavioral nuances like idempotency. The authentication note helps but doesn't compensate for the missing context needed for reliable use.

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 description coverage is 100%, so the schema fully documents all parameters. The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter semantics.

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

Purpose4/5

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

The description clearly states the action ('Subscribe to webhook notifications') and the target ('for an object'), with examples provided. It distinguishes from siblings like 'meta_get_webhook_subscriptions' by focusing on creation rather than retrieval. However, it doesn't explicitly contrast with all sibling tools, keeping it at a 4 instead of 5.

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

Usage Guidelines2/5

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

The description mentions prerequisites ('Requires META_APP_ID and META_APP_SECRET') but provides no guidance on when to use this tool versus alternatives. There's no mention of when not to use it or how it differs from similar tools, leaving usage context unclear.

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