Skip to main content
Glama
webflow

Webflow

Official
by webflow

components_list

Retrieve all components from a Webflow site with metadata including IDs, names, and versions for inventory management and integration purposes.

Instructions

List all components in a site. Returns component metadata including IDs, names, and versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idYesUnique identifier for the Site.
limitNoMaximum number of records to be returned (max limit: 100)
offsetNoOffset used for pagination if the results have more than limit records.

Implementation Reference

  • The handler function for the 'components_list' tool, which calls the Webflow API to list components for a given site, handles pagination with limit and offset, and formats the response or error.
    async ({ site_id, limit, offset }) => {
      try {
        const response = await getClient().components.list(
          site_id,
          {
            limit,
            offset,
          },
          requestOptions
        );
        return formatResponse(response);
      } catch (error) {
        return formatErrorResponse(error);
      }
    }
  • Zod input schema defining parameters for the components_list tool: site_id (required), limit and offset (optional).
    inputSchema: z.object({
      site_id: z.string().describe("Unique identifier for the Site."),
      limit: z
        .number()
        .optional()
        .describe(
          "Maximum number of records to be returned (max limit: 100)"
        ),
      offset: z
        .number()
        .optional()
        .describe(
          "Offset used for pagination if the results have more than limit records."
        ),
    }),
  • Registration of the 'components_list' MCP tool, including title, description, input schema, and inline handler function.
    server.registerTool(
      "components_list",
      {
        title: "List Components",
        description:
          "List all components in a site. Returns component metadata including IDs, names, and versions.",
        inputSchema: z.object({
          site_id: z.string().describe("Unique identifier for the Site."),
          limit: z
            .number()
            .optional()
            .describe(
              "Maximum number of records to be returned (max limit: 100)"
            ),
          offset: z
            .number()
            .optional()
            .describe(
              "Offset used for pagination if the results have more than limit records."
            ),
        }),
      },
      async ({ site_id, limit, offset }) => {
        try {
          const response = await getClient().components.list(
            site_id,
            {
              limit,
              offset,
            },
            requestOptions
          );
          return formatResponse(response);
        } catch (error) {
          return formatErrorResponse(error);
        }
      }
    );

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/webflow/mcp-server'

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