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; }

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