deleteValueGroup
Remove specified value groups in the Whistle MCP Server to manage proxy rules effectively and optimize network request handling.
Instructions
删除值分组
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupName | Yes | 分组名称 |
Implementation Reference
- src/index.ts:275-285 (registration)Registration of the 'deleteValueGroup' tool using server.addTool, including name, description, input schema, and thin handler that delegates to WhistleClient.server.addTool({ name: "deleteValueGroup", description: "删除值分组", parameters: z.object({ groupName: z.string().describe("分组名称"), }), execute: async (args) => { const result = await whistleClient.deleteValueGroup(args.groupName); return formatResponse(result); }, });
- src/index.ts:281-284 (handler)The tool's execute handler: extracts groupName arg, calls WhistleClient.deleteValueGroup, and returns formatted response.execute: async (args) => { const result = await whistleClient.deleteValueGroup(args.groupName); return formatResponse(result); },
- src/index.ts:278-280 (schema)Zod input schema requiring a 'groupName' string parameter.parameters: z.object({ groupName: z.string().describe("分组名称"), }),
- src/WhistleClient.ts:496-510 (helper)Core implementation in WhistleClient: sends POST request to Whistle's /cgi-bin/values/remove endpoint with the group name prefixed by carriage return (\r{name}) to identify it as a group.async deleteValueGroup(name: string): Promise<any> { const formData = new URLSearchParams(); formData.append("clientId", `${Date.now()}-1`); formData.append("list[]", `\r${name}`); // Adding carriage return to denote a group const response = await axios.post( `${this.baseUrl}/cgi-bin/values/remove`, formData, { headers: { "Content-Type": "application/x-www-form-urlencoded", }, } ); return response.data; }