Skip to main content
Glama

renameValue

Change the name of a value in Whistle MCP Server by specifying the existing name and the new name, enabling efficient updates to configurations and data.

Instructions

重命名值

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes值现有名称
newNameYes值的新名称

Implementation Reference

  • src/index.ts:234-245 (registration)
    Registration of the MCP tool 'renameValue', including name, description, input schema via Zod, and handler that delegates to WhistleClient.renameValue
    server.addTool({ name: "renameValue", description: "重命名值", parameters: z.object({ name: z.string().describe("值现有名称"), newName: z.string().describe("值的新名称"), }), execute: async (args) => { const result = await whistleClient.renameValue(args.name, args.newName); return formatResponse(result); }, });
  • The execute handler function for the 'renameValue' tool, which calls the WhistleClient method and formats the response
    execute: async (args) => { const result = await whistleClient.renameValue(args.name, args.newName); return formatResponse(result); },
  • Zod input schema for 'renameValue' tool parameters: existing name and new name
    parameters: z.object({ name: z.string().describe("值现有名称"), newName: z.string().describe("值的新名称"), }),
  • WhistleClient helper method that performs the actual HTTP POST to Whistle API endpoint /cgi-bin/values/rename to rename a value
    async renameValue(name: string, newName: string): Promise<any> { const formData = new URLSearchParams(); formData.append("clientId", `${Date.now()}-0`); formData.append("name", name); formData.append("newName", newName); const response = await axios.post( `${this.baseUrl}/cgi-bin/values/rename`, formData, { headers: { "Content-Type": "application/x-www-form-urlencoded", }, } ); return response.data; }

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