Skip to main content
Glama

deleteRule

Remove specific rules from the Whistle MCP Server to streamline proxy management. Input the rule name to delete it, ensuring efficient control over network request configurations.

Instructions

删除规则

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleNameYes要删除的规则名称

Implementation Reference

  • src/index.ts:82-92 (registration)
    Registers the 'deleteRule' MCP tool with name, description, input schema using Zod, and handler function.
    server.addTool({
      name: "deleteRule",
      description: "删除规则",
      parameters: z.object({
        ruleName: z.string().describe("要删除的规则名称"),
      }),
      execute: async (args) => {
        const result = await whistleClient.deleteRule(args.ruleName);
        return formatResponse(result);
      },
    });
  • Input schema definition for the deleteRule tool: requires 'ruleName' as a string.
    parameters: z.object({
      ruleName: z.string().describe("要删除的规则名称"),
    }),
  • The execute handler for the deleteRule tool, which invokes WhistleClient.deleteRule and formats the response.
    execute: async (args) => {
      const result = await whistleClient.deleteRule(args.ruleName);
      return formatResponse(result);
    },
  • Core helper function in WhistleClient that performs the HTTP POST request to delete the rule via Whistle API.
    async deleteRule(ruleName: string): Promise<any> {
      const formData = new URLSearchParams();
      formData.append("list[]", ruleName);
    
      const response = await axios.post(
        `${this.baseUrl}/cgi-bin/rules/remove`,
        formData,
        {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
        }
      );
      return response.data;
    }
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. '删除规则' implies a destructive deletion operation, but it doesn't specify whether this is permanent, reversible, requires specific permissions, affects related resources, or has side effects. For a mutation tool with zero annotation coverage, this is a critical gap in transparency.

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

Conciseness2/5

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

The description is extremely concise at just two characters, but this is under-specification rather than effective brevity. It fails to convey necessary information, making it inefficient despite its short length. Every sentence should earn its place, and this single phrase doesn't.

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

Completeness1/5

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

Given the tool's complexity (a destructive deletion operation), lack of annotations, no output schema, and rich sibling toolset, the description is completely inadequate. It doesn't explain what a 'rule' is, the consequences of deletion, or how it fits within the broader system, leaving critical 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?

Schema description coverage is 100%, with the single parameter 'ruleName' documented as '要删除的规则名称' (the name of the rule to delete). The description adds no additional meaning beyond what the schema provides, such as format constraints or examples. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose2/5

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

The description '删除规则' is a tautology that simply restates the tool name 'deleteRule' in Chinese. It provides no additional information about what resource is being deleted, what a 'rule' represents in this context, or how this differs from sibling tools like 'deleteGroup' or 'deleteValue'. The purpose is minimally stated but lacks specificity.

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

Usage Guidelines1/5

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

There is no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether the rule must exist or be disabled first), exclusions, or relationships to sibling tools like 'disableRule', 'removeRuleFromGroup', or 'deleteGroup'. The description offers zero contextual usage information.

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

Related 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/7gugu/whistle-mcp'

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