Skip to main content
Glama

renameGroup

Rename existing groups in the Whistle MCP server by specifying the current group name and the new desired name for quick and accurate proxy management.

Instructions

重命名分组

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNameYes分组的现有名称
newNameYes分组的新名称

Implementation Reference

  • The core handler function in WhistleClient that renames a group by posting form data with old and new names (prefixed with carriage return to denote groups) to the Whistle API endpoint /cgi-bin/rules/rename.
    async renameGroup(groupName: string, newName: string): Promise<any> { const formData = new URLSearchParams(); formData.append("clientId", `${Date.now()}-1`); formData.append("name", `\r${groupName}`); formData.append("newName", `\r${newName}`); const response = await axios.post( `${this.baseUrl}/cgi-bin/rules/rename`, formData, { headers: { "Content-Type": "application/x-www-form-urlencoded", }, } ); return response.data; }
  • Zod input schema for the renameGroup tool, validating groupName and newName as required strings with descriptions.
    parameters: z.object({ groupName: z.string().describe("分组的现有名称"), newName: z.string().describe("分组的新名称"), }),
  • src/index.ts:131-145 (registration)
    Registers the 'renameGroup' tool using FastMCP's server.addTool, specifying name, description, input schema, and an execute handler that calls WhistleClient.renameGroup and formats the response.
    server.addTool({ name: "renameGroup", description: "重命名分组", parameters: z.object({ groupName: z.string().describe("分组的现有名称"), newName: z.string().describe("分组的新名称"), }), execute: async (args) => { const result = await whistleClient.renameGroup( args.groupName, args.newName ); return formatResponse(result); }, });

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