createValuesGroup
Creates a new values group to organize and manage proxy settings efficiently within the Whistle MCP Server, enabling structured rule management and network monitoring.
Instructions
创建新的值分组
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 分组名称 |
Implementation Reference
- src/WhistleClient.ts:378-393 (handler)Core handler function that creates a values group by sending a POST request to Whistle's `/cgi-bin/values/add` endpoint, prefixing the group name with '\r' to denote it as a group.async createValueGroup(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/values/add`, formData, { headers: { "Content-Type": "application/x-www-form-urlencoded", }, } ); return response.data; }
- src/index.ts:197-207 (registration)Registers the MCP tool 'createValuesGroup' with the FastMCP server, defining its name, description, input schema, and execute handler that delegates to WhistleClient.server.addTool({ name: "createValuesGroup", description: "创建新的值分组", parameters: z.object({ name: z.string().describe("分组名称"), }), execute: async (args) => { const result = await whistleClient.createValueGroup(args.name); return formatResponse(result); }, });
- src/index.ts:200-202 (schema)Zod schema defining the input parameter 'name' for the createValuesGroup tool.parameters: z.object({ name: z.string().describe("分组名称"), }),