site_registered_scripts_list
Retrieve all registered scripts for a Webflow site to manage and apply custom code across pages.
Instructions
List all registered scripts for a site. To apply a script to a site or page, first register it via the Register Script endpoints, then apply it using the relevant Site or Page endpoints.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Unique identifier for the site. |
Implementation Reference
- src/tools/scripts.ts:24-34 (handler)Handler function that lists registered scripts for a site by calling the Webflow API's scripts.list method and formatting the response.async ({ site_id }) => { try { const response = await getClient().scripts.list( site_id, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } }
- src/tools/scripts.ts:20-22 (schema)Zod input schema defining the required 'site_id' parameter.inputSchema: z.object({ site_id: z.string().describe("Unique identifier for the site."), }),
- src/tools/scripts.ts:14-35 (registration)Registration of the 'site_registered_scripts_list' tool with MCP server, specifying title, description, input schema, and handler.server.registerTool( "site_registered_scripts_list", { title: "List Registered Scripts", description: "List all registered scripts for a site. To apply a script to a site or page, first register it via the Register Script endpoints, then apply it using the relevant Site or Page endpoints.", inputSchema: z.object({ site_id: z.string().describe("Unique identifier for the site."), }), }, async ({ site_id }) => { try { const response = await getClient().scripts.list( site_id, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );