Skip to main content
Glama

addValueToGroup

Add a specific value to a defined group within the Whistle MCP Server to manage and organize proxy server rules effectively.

Instructions

将值添加到分组

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNameYes分组名称
valueNameYes要添加的值名称

Implementation Reference

  • src/index.ts:287-301 (registration)
    Registers the MCP tool 'addValueToGroup' with FastMCP, including input schema (groupName, valueName), description, and an inline execute handler that delegates to WhistleClient.moveValueToGroup and formats the response.
    server.addTool({
      name: "addValueToGroup",
      description: "将值添加到分组",
      parameters: z.object({
        groupName: z.string().describe("分组名称"),
        valueName: z.string().describe("要添加的值名称"),
      }),
      execute: async (args) => {
        const result = await whistleClient.moveValueToGroup(
          args.valueName,
          args.groupName
        );
        return formatResponse(result);
      },
    });
  • Core handler logic for adding/moving a value to a group in Whistle by sending form-encoded POST request to /cgi-bin/values/move-to with from=valueName, to=\rgroupName.
    async moveValueToGroup(name: string, groupName: string): Promise<any> {
      const formData = new URLSearchParams();
      formData.append("clientId", `${Date.now()}-1`);
      formData.append("from", name);
      formData.append("to", `\r${groupName}`); // Adding carriage return to denote a group
      formData.append("group", "false"); // Not moving a group, but a value
    
      const response = await axios.post(
        `${this.baseUrl}/cgi-bin/values/move-to`,
        formData,
        {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
        }
      );
      return response.data;
    }
  • Zod schema defining input parameters for the tool: groupName and valueName as strings.
    parameters: z.object({
      groupName: z.string().describe("分组名称"),
      valueName: z.string().describe("要添加的值名称"),
    }),
  • Helper function used by all tools, including addValueToGroup, to format responses as MCP content array with JSON stringified data.
    function formatResponse(data: any) {
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(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. It only states the action 'add value to group' without disclosing behavioral traits like permissions needed, whether it's idempotent, error handling (e.g., if value/group doesn't exist), or side effects. For a mutation tool with zero annotation coverage, this is a significant 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.

Conciseness3/5

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

The description is a single phrase '将值添加到分组', which is concise but under-specified—it lacks context and could be more informative. It's front-loaded but doesn't earn its place with useful details beyond the obvious. For a tool with 2 parameters and no annotations, more elaboration would be beneficial without sacrificing brevity.

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 the tool's complexity (mutation with 2 parameters), no annotations, and no output schema, the description is incomplete. It doesn't explain what happens after adding (e.g., success response, error cases), or how it interacts with sibling tools like 'getAllValues'. For a tool that modifies data, more context on behavior and outcomes is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters ('分组名称' for groupName and '要添加的值名称' for valueName). The description adds no additional meaning beyond the schema, but with high coverage, the baseline is 3. Since there are only 2 parameters and the schema fully documents them, a score of 4 reflects adequate parameter understanding without extra description input.

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 '将值添加到分组' (add value to group) restates the tool name 'addValueToGroup' in Chinese, making it tautological. It doesn't specify what type of value or group, or what system this operates on, though the verb 'add' is clear. Compared to siblings like 'createValue' or 'removeValueFromGroup', it doesn't differentiate scope or behavior beyond the basic action.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like 'createValue' (which might create a value independently) or 'removeValueFromGroup'. The description implies adding an existing value to a group, but doesn't state prerequisites (e.g., value/group must exist) or exclusions. Usage is implied from the name but not explicitly defined.

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