Skip to main content
Glama
webflow

Webflow

Official
by webflow

sites_publish

Publish a Webflow site to specified domains, making the latest changes live on custom domains or Webflow subdomains.

Instructions

Publish a site to specified domains. This will make the latest changes live on the specified domains.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idYesUnique identifier for the site.
customDomainsNoArray of custom domains to publish the site to.
publishToWebflowSubdomainNoWhether to publish to the Webflow subdomain.

Implementation Reference

  • Handler function that publishes the site using WebflowClient.sites.publish API, handling custom domains and Webflow subdomain options.
    async ({ site_id, customDomains, publishToWebflowSubdomain }) => {
      try {
        const response = await getClient().sites.publish(
          site_id,
          {
            customDomains,
            publishToWebflowSubdomain,
          },
          requestOptions
        );
        return formatResponse(response);
      } catch (error) {
        return formatErrorResponse(error);
      }
    }
  • Zod input schema defining parameters for the sites_publish tool: site_id (required), customDomains (optional array), publishToWebflowSubdomain (optional boolean, default false).
    inputSchema: z.object({
      site_id: z.string().describe("Unique identifier for the site."),
      customDomains: z
        .string()
        .array()
        .optional()
        .describe("Array of custom domains to publish the site to."),
      publishToWebflowSubdomain: z
        .boolean()
        .optional()
        .default(false)
        .describe("Whether to publish to the Webflow subdomain."),
    }),
  • Registration of the sites_publish tool on the MCP server, including schema and handler.
    server.registerTool(
      "sites_publish",
      {
        title: "Publish Site",
        description:
          "Publish a site to specified domains. This will make the latest changes live on the specified domains.",
        inputSchema: z.object({
          site_id: z.string().describe("Unique identifier for the site."),
          customDomains: z
            .string()
            .array()
            .optional()
            .describe("Array of custom domains to publish the site to."),
          publishToWebflowSubdomain: z
            .boolean()
            .optional()
            .default(false)
            .describe("Whether to publish to the Webflow subdomain."),
        }),
      },
      async ({ site_id, customDomains, publishToWebflowSubdomain }) => {
        try {
          const response = await getClient().sites.publish(
            site_id,
            {
              customDomains,
              publishToWebflowSubdomain,
            },
            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