components_list
Retrieve all components from a Webflow site with metadata including IDs, names, and versions for inventory management and integration purposes.
Instructions
List all components in a site. Returns component metadata including IDs, names, and versions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Unique identifier for the Site. | |
| 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:38-52 (handler)The handler function for the 'components_list' tool, which calls the Webflow API to list components for a given site, handles pagination with limit and offset, and formats the response or error.async ({ site_id, limit, offset }) => { try { const response = await getClient().components.list( site_id, { limit, offset, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- src/tools/components.ts:22-36 (schema)Zod input schema defining parameters for the components_list tool: site_id (required), limit and offset (optional).inputSchema: z.object({ site_id: z.string().describe("Unique identifier for the Site."), 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:16-53 (registration)Registration of the 'components_list' MCP tool, including title, description, input schema, and inline handler function.server.registerTool( "components_list", { title: "List Components", description: "List all components in a site. Returns component metadata including IDs, names, and versions.", inputSchema: z.object({ site_id: z.string().describe("Unique identifier for the Site."), 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, limit, offset }) => { try { const response = await getClient().components.list( site_id, { limit, offset, }, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );