site_applied_scripts_list
Retrieve all custom scripts applied to a Webflow site to manage and audit site functionality and integrations.
Instructions
Get all scripts applied to a site by the App. 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:48-57 (handler)The handler function that executes the 'site_applied_scripts_list' tool. It fetches the list of applied scripts (custom code) for a given site ID using the Webflow API client and formats the response.async ({ site_id }) => { try { const response = await getClient().sites.scripts.getCustomCode( site_id, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); }
- src/tools/scripts.ts:44-46 (schema)The input schema for the tool, defining the required 'site_id' parameter.inputSchema: z.object({ site_id: z.string().describe("Unique identifier for the site."), }),
- src/tools/scripts.ts:39-59 (registration)The registration of the 'site_applied_scripts_list' tool using McpServer.registerTool, including title, description, input schema, and handler."site_applied_scripts_list", { title: "List Applied Scripts", description: "Get all scripts applied to a site by the App. 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().sites.scripts.getCustomCode( site_id, requestOptions ); return formatResponse(response); } catch (error) { return formatErrorResponse(error); } } );