components_get_content
Retrieve structured content data for Webflow components, including text, images, and nested elements, to integrate component information into external systems.
Instructions
Get the content structure and data for a specific component including text, images, and nested components.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Unique identifier for the Site. | |
| component_id | Yes | Unique identifier for the Component. | |
| localeId | No | Unique identifier for a specific locale. Applicable when using localization. | |
| limit | No | Maximum number of records to be returned (max limit: 100) | |
| offset | No | Offset used for pagination if the results have more than limit records. |
Implementation Reference
- src/tools/components.ts:87-103 (handler)Handler function that retrieves the content structure and data for a specific component by calling the Webflow API's getContent method.async ({ site_id, component_id, localeId, limit, offset }) => { try { const response = await getClient().components.getContent( site_id, component_id, { localeId, limit, offset, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- src/tools/components.ts:62-86 (schema)Zod input schema defining parameters for the components_get_content tool: site_id, component_id, optional localeId, limit, and offset.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() .optional() .describe( "Unique identifier for a specific locale. Applicable when using localization." ), limit: z .number() .optional() .describe( "Maximum number of records to be returned (max limit: 100)" ), offset: z .number() .optional() .describe( "Offset used for pagination if the results have more than limit records." ), }), },
- src/tools/components.ts:56-104 (registration)Registration of the 'components_get_content' tool with the MCP server, specifying name, title, description, input schema, and handler function.server.registerTool( "components_get_content", { title: "Get Component Content", description: "Get the content structure and data for a specific component including text, images, and nested components.", 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() .optional() .describe( "Unique identifier for a specific locale. Applicable when using localization." ), limit: z .number() .optional() .describe( "Maximum number of records to be returned (max limit: 100)" ), offset: z .number() .optional() .describe( "Offset used for pagination if the results have more than limit records." ), }), }, async ({ site_id, component_id, localeId, limit, offset }) => { try { const response = await getClient().components.getContent( site_id, component_id, { localeId, limit, offset, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );