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
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Unique identifier for the site. | |
| customDomains | No | Array of custom domains to publish the site to. | |
| publishToWebflowSubdomain | No | Whether to publish to the Webflow subdomain. |
Implementation Reference
- src/tools/sites.ts:72-86 (handler)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); } }
- src/tools/sites.ts:58-70 (schema)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."), }),
- src/tools/sites.ts:52-87 (registration)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); } } );