Skip to main content
Glama
webflow

Webflow

Official
by webflow

Update Component Content

components_update_content

Modify text and property overrides for components in secondary locales to update localized content across Webflow sites.

Instructions

Update content on a component in secondary locales by modifying text nodes and property overrides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idYesUnique identifier for the Site.
component_idYesUnique identifier for the Component.
localeIdYesUnique identifier for a specific locale. Applicable when using localization.
nodesYes

Implementation Reference

  • The handler function that executes the tool logic by calling the Webflow API's components.updateContent method with the provided parameters and handling the response or error.
    async ({ site_id, component_id, localeId, nodes }) => {
      try {
        const response = await getClient().components.updateContent(
          site_id,
          component_id,
          {
            localeId,
            nodes,
          },
          requestOptions
        );
        return formatResponse(response);
      } catch (error) {
        return formatErrorResponse(error);
      }
    }
  • Registers the 'components_update_content' tool with the MCP server, specifying title, description, input schema, and the handler function.
    server.registerTool(
      "components_update_content",
      {
        title: "Update Component Content",
        description:
          "Update content on a component in secondary locales by modifying text nodes and property overrides.",
        inputSchema: z.object({
          site_id: z.string().describe("Unique identifier for the Site."),
          component_id: z
            .string()
            .describe("Unique identifier for the Component."),
          localeId: z
            .string()
            .describe(
              "Unique identifier for a specific locale. Applicable when using localization."
            ),
          nodes: ComponentDomWriteNodesItemSchema,
        }),
      },
      async ({ site_id, component_id, localeId, nodes }) => {
        try {
          const response = await getClient().components.updateContent(
            site_id,
            component_id,
            {
              localeId,
              nodes,
            },
            requestOptions
          );
          return formatResponse(response);
        } catch (error) {
          return formatErrorResponse(error);
        }
      }
    );
  • Zod schema defining the structure for 'nodes' parameter: an array of either text node updates or property overrides for component content updates.
    export const ComponentDomWriteNodesItemSchema = 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."),
          })
          .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."),
                })
              )
              .describe(
                "Properties to override for this locale's component instances."
              ),
          })
          .describe("Update text property overrides of a component instance."),
      ])
      .array();
  • Inline Zod input schema for the tool, composing site_id, component_id, localeId, and nodes using the imported ComponentDomWriteNodesItemSchema.
    inputSchema: z.object({
      site_id: z.string().describe("Unique identifier for the Site."),
      component_id: z
        .string()
        .describe("Unique identifier for the Component."),
      localeId: z
        .string()
        .describe(
          "Unique identifier for a specific locale. Applicable when using localization."
        ),
      nodes: ComponentDomWriteNodesItemSchema,
    }),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a mutation operation ('update') but doesn't disclose permission requirements, whether changes are reversible, rate limits, or what happens to existing content not mentioned. The mention of 'secondary locales' hints at localization context but lacks operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and target. Every word earns its place with no redundancy or fluff, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain the return value, error conditions, or the impact of updates on existing content. The localization context ('secondary locales') is mentioned but not elaborated, leaving gaps in understanding the tool's full behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75%, providing a solid baseline. The description adds marginal value by mentioning 'text nodes and property overrides', which aligns with the 'nodes' parameter's structure. However, it doesn't clarify the relationship between 'localeId' and 'secondary locales' or provide examples of typical node updates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'update' and resource 'component content', specifying it targets 'secondary locales' by modifying 'text nodes and property overrides'. It distinguishes from sibling 'components_update_properties' by focusing on content rather than properties, though the distinction could be more explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'components_update_properties' or 'pages_update_static_content'. It mentions 'secondary locales' but doesn't clarify prerequisites, exclusions, or typical scenarios for its application.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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