Skip to main content
Glama
webflow

Webflow

Official
by webflow

Delete All Site Scripts

delete_all_site_scripts

Remove all custom scripts from a Webflow site to clean up code and resolve script conflicts.

Instructions

Delete all custom scripts from a site.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idYes

Implementation Reference

  • The handler function that executes the tool logic by calling the Webflow API's sites.scripts.deleteCustomCode method to delete all custom scripts from the specified site. Handles 404 errors gracefully.
    async ({ site_id }) => {
      try {
        const response = await getClient().sites.scripts.deleteCustomCode(
          site_id,
          requestOptions
        );
        return formatResponse("Custom Code Deleted");
      } catch (error) {
        // If it's a 404, we'll try to clear the scripts another way
        if (isApiError(error) && error.status === 404) {
          return formatResponse(error.message ?? "No custom code found");
        }
        throw error;
      }
    }
  • Inline input schema definition for the tool using Zod, requiring a 'site_id' string parameter.
    {
      title: "Delete All Site Scripts",
      description: "Delete all custom scripts from a site.",
      inputSchema: z.object({
        site_id: z.string(),
      }),
    },
  • The server.registerTool call that registers the 'delete_all_site_scripts' tool, providing title, description, input schema, and the handler function.
    server.registerTool(
      "delete_all_site_scripts",
      {
        title: "Delete All Site Scripts",
        description: "Delete all custom scripts from a site.",
        inputSchema: z.object({
          site_id: z.string(),
        }),
      },
      async ({ site_id }) => {
        try {
          const response = await getClient().sites.scripts.deleteCustomCode(
            site_id,
            requestOptions
          );
          return formatResponse("Custom Code Deleted");
        } catch (error) {
          // If it's a 404, we'll try to clear the scripts another way
          if (isApiError(error) && error.status === 404) {
            return formatResponse(error.message ?? "No custom code found");
          }
          throw error;
        }
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the destructive action ('Delete all') but lacks details on permissions required, irreversibility, confirmation prompts, or error handling. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is front-loaded with the core action and resource, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity as a destructive operation, lack of annotations, no output schema, and low schema coverage, the description is incomplete. It fails to address critical aspects like safety warnings, return values, or error conditions, leaving significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description implies the 'site_id' parameter by mentioning 'from a site', but with 0% schema description coverage and only 1 parameter, it adds minimal meaning beyond the schema. Since schema coverage is low, the description should compensate more, but it only provides basic context, resulting in an adequate baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('all custom scripts from a site'), making the purpose specific and understandable. However, it does not explicitly differentiate from sibling tools like 'site_applied_scripts_list' or 'site_registered_scripts_list', which might list scripts without deletion, so it lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it does not mention if this should be used for cleanup versus selective deletion, or if there are prerequisites like verifying scripts first. The description is too basic to offer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/webflow/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server