Skip to main content
Glama

createGroup

Creates a new group for organizing and managing Whistle proxy rules and configurations using the Whistle MCP Server. Simplifies proxy management by enabling structured rule grouping.

Instructions

创建新分组

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes分组名称

Implementation Reference

  • The core handler function `createGroup` in WhistleClient class that creates a group by sending a POST request to Whistle's rules/add endpoint, prefixing the group name with a carriage return (\r) to identify it as a group.
    async createGroup(name: string): Promise<any> {
      const formData = new URLSearchParams();
      formData.append("clientId", `${Date.now()}-1`);
      formData.append("name", `\r${name}`);
    
      const response = await axios.post(
        `${this.baseUrl}/cgi-bin/rules/add`,
        formData,
        {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
        }
      );
      return response.data;
    }
  • src/index.ts:119-129 (registration)
    Registers the 'createGroup' MCP tool using FastMCP's addTool method, defining its name, description, input schema with Zod, and execute handler that delegates to WhistleClient.createGroup.
    server.addTool({
      name: "createGroup",
      description: "创建新分组",
      parameters: z.object({
        name: z.string().describe("分组名称"),
      }),
      execute: async (args) => {
        const result = await whistleClient.createGroup(args.name);
        return formatResponse(result);
      },
    });
  • Zod schema for the createGroup tool input parameters, requiring a 'name' string for the group name.
    parameters: z.object({
      name: z.string().describe("分组名称"),
    }),
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. '创建新分组' only indicates it's a creation operation without specifying what happens after creation, whether it requires specific permissions, if it's idempotent, what error conditions exist, or what the response contains. For a mutation tool with zero annotation coverage, this is severely inadequate.

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

Conciseness4/5

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

The description is extremely concise - just three Chinese characters. While this could be considered under-specified rather than appropriately concise, it's front-loaded and contains no wasted words. The single phrase directly states the core function without unnecessary elaboration.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what a 'group' represents in this context, what happens after creation, or what the tool returns. Given the complexity implied by many sibling tools for managing groups, rules, and values, more context is needed for the agent to use this effectively.

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 input schema has 100% description coverage with the 'name' parameter clearly documented in Chinese. The description doesn't add any parameter information beyond what's in the schema. With complete schema coverage, the baseline score of 3 is appropriate since the schema does the heavy lifting for parameter documentation.

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 '创建新分组' (Create new group) restates the tool name 'createGroup' with minimal elaboration. It specifies the verb 'create' and resource 'group', but doesn't distinguish it from sibling tools like 'createRule', 'createValue', or 'createValuesGroup'. The description is tautological rather than explanatory.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when not to use it, or how it relates to sibling tools like 'renameGroup', 'deleteGroup', or other group-related operations. There's complete absence of 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