sites_publish
Publish Webflow sites to specified custom domains or a Webflow subdomain by providing the site ID and domain details. Manage site deployment efficiently with this MCP server tool.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customDomains | No | ||
| publishToWebflowSubdomain | No | ||
| site_id | Yes |
Implementation Reference
- src/tools/sites.ts:59-73 (handler)The handler function that executes the sites_publish tool by calling the Webflow API's sites.publish method with the provided site_id, custom domains, and option to publish to 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); } }
- src/tools/sites.ts:46-58 (schema)Zod schema defining the input parameters for the sites_publish tool: site_id (required string), customDomains (optional array of strings), publishToWebflowSubdomain (optional boolean, default false).{ 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:43-74 (registration)Registration of the sites_publish tool using server.tool(), including description, input schema, and handler function within the registerSiteTools function.server.tool( "sites_publish", "Publish a site to specified domains. This will make the latest changes live on the specified domains.", { 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); } } );