Skip to main content
Glama

setAllRulesState

Toggle the enabled/disabled state of all rules in Whistle MCP Server. Use this tool to globally manage rule activation with a single boolean input.

Instructions

控制所有规则的启用状态(启用/禁用)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
disabledYestrue表示禁用所有规则,false表示启用所有规则

Implementation Reference

  • Core handler function that sends HTTP POST request to Whistle's /cgi-bin/rules/disable-all-rules endpoint to set all rules enabled/disabled state based on the 'disabledAllRules' parameter.
    async disableAllRules(disabledAllRules: boolean): Promise<any> { const formData = new URLSearchParams(); formData.append("clientId", `${Date.now()}-1`); formData.append("disabledAllRules", disabledAllRules ? "1" : "0"); const response = await axios.post( `${this.baseUrl}/cgi-bin/rules/disable-all-rules`, formData, { headers: { "Content-Type": "application/x-www-form-urlencoded", }, } ); return response.data; }
  • src/index.ts:437-449 (registration)
    Registers the 'setAllRulesState' tool in FastMCP server, defines input schema (disabled: boolean) and execute handler that delegates to WhistleClient.disableAllRules.
    server.addTool({ name: "setAllRulesState", description: "控制所有规则的启用状态(启用/禁用)", parameters: z.object({ disabled: z .boolean() .describe("true表示禁用所有规则,false表示启用所有规则"), }), execute: async (args) => { const result = await whistleClient.disableAllRules(args.disabled); return formatResponse(result); }, });
  • Zod schema for tool input parameters.
    parameters: z.object({ disabled: z .boolean() .describe("true表示禁用所有规则,false表示启用所有规则"), }),

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