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表示启用所有规则"),
    }),
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions enabling/disabling but doesn't disclose behavioral traits like whether this requires specific permissions, if it's reversible, what happens to existing rule states, or any rate limits. For a mutation tool with zero annotation coverage, this is inadequate.

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, efficient sentence in Chinese that directly states the purpose without unnecessary words. It's appropriately sized and front-loaded, with zero waste.

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 this is a mutation tool with no annotations, no output schema, and 1 parameter, the description is incomplete. It doesn't cover behavioral aspects like permissions, reversibility, or response format, which are crucial for safe and effective use.

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%, so the schema already documents the 'disabled' parameter fully. The description doesn't add any meaning beyond what the schema provides, such as explaining the implications of setting true/false beyond the basic definition. Baseline 3 is appropriate when schema does the heavy lifting.

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 ('控制' meaning control) and target ('所有规则的启用状态' meaning enabled state of all rules), specifying it's about enabling/disabling. It doesn't explicitly differentiate from sibling tools like 'disableRule' or 'enableRule' which affect individual rules, but the scope difference is implied.

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

Usage Guidelines3/5

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

The description implies usage for bulk control of rules, but doesn't explicitly state when to use this versus alternatives like 'disableRule' or 'enableRule' for individual rules, or mention prerequisites or exclusions. The context is clear but lacks explicit guidance.

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