pages_update_static_content
Update static content elements on Webflow pages by modifying node text or property overrides for specified locale and page ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| localeId | Yes | ||
| nodes | Yes | ||
| page_id | Yes |
Implementation Reference
- src/tools/pages.ts:172-186 (handler)The handler function for the 'pages_update_static_content' tool. It calls the WebflowClient's updateStaticContent method to update text nodes or property overrides on a page in a specific locale, formats the response or error.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); } }
- Zod schema for the 'nodes' parameter, an array of either text node updates (nodeId and text) or component property overrides (nodeId and propertyOverrides array). Used in the tool's input schema.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:160-187 (registration)Direct registration of the 'pages_update_static_content' tool using McpServer.tool(), specifying name, description, input schema (page_id, localeId, nodes), and handler function.server.tool( "pages_update_static_content", "Update content on a static page in secondary locales by modifying text nodes and property overrides.", { 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); } } );
- src/mcp.ts:51-51 (registration)High-level registration call to registerPagesTools within the registerTools function, which includes the pages_update_static_content tool among others.registerPagesTools(server, getClient);