Skip to main content
Glama
webflow

Webflow

Official
by webflow

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
NameRequiredDescriptionDefault
page_idYesUnique identifier for the page.
localeIdYesUnique identifier for a specific locale. Applicable when using localization.
nodesYes

Implementation Reference

  • 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);
      }
    }
  • 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();
  • 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);
        }
      }
    );

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