Update Component Properties
components_update_propertiesUpdate component properties for localization to customize behavior in different languages on Webflow sites.
Instructions
Update component properties for localization to customize behavior in different languages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Unique identifier for the Site. | |
| component_id | Yes | Unique identifier for the Component. | |
| localeId | Yes | Unique identifier for a specific locale. Applicable when using localization. | |
| properties | Yes | Array of properties to update for this component. |
Implementation Reference
- src/tools/components.ts:215-230 (handler)The handler function that performs the tool logic: calls WebflowClient.components.updateProperties API with site_id, component_id, localeId, and properties, then formats the response or error.
async ({ site_id, component_id, localeId, properties }) => { try { const response = await getClient().components.updateProperties( site_id, component_id, { localeId, properties, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } - src/tools/components.ts:196-231 (registration)Registers the 'components_update_properties' tool on the MCP server, defining its title, description, input schema, and handler function.
server.registerTool( "components_update_properties", { title: "Update Component Properties", description: "Update component properties for localization to customize behavior in different languages.", 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." ), properties: ComponentPropertyUpdateSchema, }), }, async ({ site_id, component_id, localeId, properties }) => { try { const response = await getClient().components.updateProperties( site_id, component_id, { localeId, properties, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } ); - Zod schema defining the 'properties' input: an array of objects each with 'propertyId' (string) and 'text' (string) for updating component properties.
export const ComponentPropertyUpdateSchema = z .array( z.object({ propertyId: z.string().describe("Unique identifier for the property."), text: z.string().describe("New value for the property in this locale."), }) ) .describe("Array of properties to update for this component.");