pages_update_static_content
Modify text and component properties on localized static pages to update content across different language versions.
Instructions
Update content on a static page in secondary locales by modifying text nodes and property overrides.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | Unique identifier for the page. | |
| localeId | Yes | Unique identifier for a specific locale. Applicable when using localization. | |
| nodes | Yes |
Implementation Reference
- src/tools/pages.ts:196-210 (handler)The asynchronous handler function that executes the tool logic by invoking the Webflow client's updateStaticContent method with page_id, localeId, and nodes parameters, handling the response or error formatting.async ({ page_id, localeId, nodes }) => { try { const response = await getClient().pages.updateStaticContent( page_id, { localeId, nodes, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- src/tools/pages.ts:186-194 (schema)The primary Zod input schema for the tool, defining required parameters: page_id (string), localeId (string), and nodes (array schema imported from WebflowPageDomWriteNodesItemSchema).inputSchema: z.object({ page_id: z.string().describe("Unique identifier for the page."), localeId: z .string() .describe( "Unique identifier for a specific locale. Applicable when using localization." ), nodes: WebflowPageDomWriteNodesItemSchema, }),
- Detailed Zod schema used for the 'nodes' input field, supporting an array of either direct text node updates or component property overrides for localized static content updates.export const WebflowPageDomWriteNodesItemSchema = z .union([ z .object({ nodeId: z.string().describe("Unique identifier for the node."), text: z .string() .describe( "HTML content of the node, including the HTML tag. The HTML tags must be the same as what’s returned from the Get Content endpoint." ), }) .describe("Text node to be updated."), z .object({ nodeId: z.string().describe("Unique identifier for the node."), propertyOverrides: z.array( z .object({ propertyId: z .string() .describe("Unique identifier for the property."), text: z .string() .describe( "Value used to override a component property; must be type-compatible to prevent errors." ), }) .describe( "Properties to override for this locale’s component instances." ) ), }) .describe("Update text property overrides of a component instance."), ]) .array();
- src/tools/pages.ts:180-211 (registration)The MCP server tool registration call, including the tool name, title, description, input schema, and inline handler function.server.registerTool( "pages_update_static_content", { title: "Update Page Static Content", description: "Update content on a static page in secondary locales by modifying text nodes and property overrides.", inputSchema: z.object({ page_id: z.string().describe("Unique identifier for the page."), localeId: z .string() .describe( "Unique identifier for a specific locale. Applicable when using localization." ), nodes: WebflowPageDomWriteNodesItemSchema, }), }, async ({ page_id, localeId, nodes }) => { try { const response = await getClient().pages.updateStaticContent( page_id, { localeId, nodes, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );