Components

The Components tool provides access to your site’s reusable components, allowing you to list components, retrieve their content and properties, and update localized versions for multi-language sites.

When to use

Use the Components tool to:

  • List all components: Get an overview of reusable components in your site
  • Inspect component structure: View component content, elements, and nesting
  • Manage localization: Update component content and properties for different languages
  • Audit components: Check component usage and configuration
  • Update translations: Modify text and properties in secondary locales

Tool details

Tool name: data_components_tool

Available actions

List components

List all components in a site with metadata including IDs, names, and versions.

Action: list_components

Parameters:

ParameterTypeRequiredDescription
site_idstringYesUnique identifier for the site
limitnumberNoNumber of components to return
offsetnumberNoPagination offset

Returns: Array of components with metadata

Example usage:

List all components for site [site_id]

Get component content

Retrieve the complete content structure for a component including text, images, and nested components.

Action: get_component_content

Parameters:

ParameterTypeRequiredDescription
site_idstringYesUnique identifier for the site
component_idstringYesUnique identifier for the component
localeIdstringNoLocale ID for localized content
limitnumberNoNumber of elements to return
offsetnumberNoPagination offset

Returns: Complete component content structure

Example usage:

Get the content structure for component [component_id]

Use this to understand what text nodes and elements exist in a component before making localization updates.

Update component content

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

Action: update_component_content

Parameters:

ParameterTypeRequiredDescription
site_idstringYesUnique identifier for the site
component_idstringYesUnique identifier for the component
localeIdstringYesLocale ID for the secondary locale
nodesarrayYesArray of content nodes to update

Example usage:

Update the heading text in component [component_id] for Spanish locale to "Bienvenidos"

This action only works with secondary locales. You cannot update the primary locale using this tool.

Get component properties

Retrieve component properties including default values and configuration settings.

Action: get_component_properties

Parameters:

ParameterTypeRequiredDescription
site_idstringYesUnique identifier for the site
component_idstringYesUnique identifier for the component
localeIdstringNoLocale ID for localized properties
limitnumberNoNumber of properties to return
offsetnumberNoPagination offset

Returns: Component properties with values and configuration

Example usage:

Get properties for component [component_id]

Update component properties

Update component properties for localization to customize behavior in different languages.

Action: update_component_properties

Parameters:

ParameterTypeRequiredDescription
site_idstringYesUnique identifier for the site
component_idstringYesUnique identifier for the component
localeIdstringYesLocale ID for the secondary locale
propertiesobjectYesProperties to update

Example usage:

Update the button text property for component [component_id] in French locale

Best practices

Always use get_component_content before making updates to understand the component’s structure, text nodes, and nested elements.

Maintain consistent terminology across components in the same locale. Create a translation glossary to ensure consistency.

After updating a component, verify that all instances of that component throughout your site display correctly.

When components contain other components, update the parent and child components separately. Nested content may require individual localization.

Before making significant component updates, document the current state or create a backup. Component changes affect all instances site-wide.

Limitations

  • Secondary locales only: Content and property updates only work with secondary locales
  • Component structure: Cannot change component structure (add/remove elements) via Data API