Skip to main content
Glama

list_webhooks

List webhook subscriptions on your Shopify store to audit existing automation hooks. Filter by topic (e.g., ORDERS_CREATE) to view delivery format, endpoint, and filters per subscription.

Instructions

List webhook subscriptions on the store. Each subscription wires a Shopify event topic (ORDERS_CREATE, PRODUCTS_UPDATE, INVENTORY_LEVELS_UPDATE, etc.) to a delivery target — typically an HTTPS callback URL, but Pub/Sub and EventBridge are also supported. Returns each subscription's topic, delivery format (JSON/XML), endpoint, API version, and any field/metafield filters applied. Filter by topic to scope the result. Use this to audit existing automation hooks before creating new ones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
firstNo
topicsNoFilter by WebhookSubscriptionTopic values, e.g. ['ORDERS_CREATE', 'PRODUCTS_UPDATE']. Use uppercase underscore form.
afterNo

Implementation Reference

  • The 'list_webhooks' tool handler executed via server.tool(). It accepts pagination (first, after) and topic filtering, queries Shopify GraphQL LIST_WEBHOOKS_QUERY, and returns formatted summaries of webhook subscriptions.
    server.tool(
      "list_webhooks",
      "List webhook subscriptions on the store. Each subscription wires a Shopify event topic (ORDERS_CREATE, PRODUCTS_UPDATE, INVENTORY_LEVELS_UPDATE, etc.) to a delivery target — typically an HTTPS callback URL, but Pub/Sub and EventBridge are also supported. Returns each subscription's topic, delivery format (JSON/XML), endpoint, API version, and any field/metafield filters applied. Filter by topic to scope the result. Use this to audit existing automation hooks before creating new ones.",
      listWebhooksSchema,
      async (args) => {
        const data = await client.graphql<{
          webhookSubscriptions: Connection<WebhookSubscriptionNode>;
        }>(LIST_WEBHOOKS_QUERY, {
          first: args.first,
          after: args.after,
          topics: args.topics,
        });
        const edges = data.webhookSubscriptions.edges;
        if (edges.length === 0) {
          return {
            content: [
              { type: "text" as const, text: "No webhook subscriptions." },
            ],
          };
        }
        return {
          content: [
            {
              type: "text" as const,
              text: [
                `Found ${edges.length} webhook subscription(s):`,
                ...edges.map(({ node }) => summarizeWebhook(node)),
              ].join("\n"),
            },
          ],
        };
      },
    );
  • Zod schema for list_webhooks input: first (1-100, default 20), topics (optional array of strings), after (optional cursor string).
    const listWebhooksSchema = {
      first: z.number().int().min(1).max(100).default(20),
      topics: z
        .array(z.string())
        .optional()
        .describe(
          "Filter by WebhookSubscriptionTopic values, e.g. ['ORDERS_CREATE', 'PRODUCTS_UPDATE']. Use uppercase underscore form.",
        ),
      after: z.string().optional(),
    };
  • src/server.ts:66-66 (registration)
    Registration of all webhook tools (including list_webhooks) via registerWebhookTools(s, shopify) in the buildServer() function.
    registerWebhookTools(s, shopify);
  • The export function registerWebhookTools that registers the tool on the MCP server, binding the name 'list_webhooks' with its schema and handler.
    export function registerWebhookTools(
      server: McpServer,
      client: ShopifyClient,
    ): void {
      server.tool(
        "list_webhooks",
        "List webhook subscriptions on the store. Each subscription wires a Shopify event topic (ORDERS_CREATE, PRODUCTS_UPDATE, INVENTORY_LEVELS_UPDATE, etc.) to a delivery target — typically an HTTPS callback URL, but Pub/Sub and EventBridge are also supported. Returns each subscription's topic, delivery format (JSON/XML), endpoint, API version, and any field/metafield filters applied. Filter by topic to scope the result. Use this to audit existing automation hooks before creating new ones.",
        listWebhooksSchema,
        async (args) => {
          const data = await client.graphql<{
            webhookSubscriptions: Connection<WebhookSubscriptionNode>;
          }>(LIST_WEBHOOKS_QUERY, {
            first: args.first,
            after: args.after,
            topics: args.topics,
          });
          const edges = data.webhookSubscriptions.edges;
          if (edges.length === 0) {
            return {
              content: [
                { type: "text" as const, text: "No webhook subscriptions." },
              ],
            };
          }
          return {
            content: [
              {
                type: "text" as const,
                text: [
                  `Found ${edges.length} webhook subscription(s):`,
                  ...edges.map(({ node }) => summarizeWebhook(node)),
                ].join("\n"),
              },
            ],
          };
        },
      );
  • src/server.ts:22-22 (registration)
    Import statement for registerWebhookTools from the webhooks.ts tool module.
    import { registerWebhookTools } from "./tools/webhooks.js";
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It explains what is returned (topic, delivery format, endpoint, etc.) but does not mention pagination, rate limits, authorization needs, or any side effects. As a read operation, it lacks detail on behavior beyond the obvious.

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 concise and front-loaded with the main purpose. Every sentence adds value, and it efficiently conveys the tool's function and return details. It could be slightly tighter, but overall well-structured.

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?

The description covers the return values well and mentions filtering, but does not explain pagination behavior for 'first' and 'after' parameters, nor does it specify the output format. Given no output schema and no annotations, some context is missing for a fully complete understanding.

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 low at 33%, but the description adds value by explaining that webhooks wire events to delivery targets and providing examples of topic values. However, it does not elaborate on the 'first' and 'after' pagination parameters, leaving a gap.

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 it lists webhook subscriptions on the store, specifying the resource (webhooks), action (list), and scope (on the store). It distinguishes from sibling tools like create_webhook by mentioning auditing before creating.

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

Usage Guidelines4/5

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

The description advises to use this tool to audit existing automation hooks before creating new ones, providing clear context. It also notes filtering by topic, but does not explicitly mention when not to use or provide alternatives beyond the hint about creation.

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/miller-joe/shopify-mcp'

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