bear_rename_tag
Change an existing tag's name in Bear App to update organization and maintain consistency across notes.
Instructions
Rename an existing tag
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Current tag name | |
| new_name | Yes | New tag name | |
| show_window | No | Show Bear window |
Implementation Reference
- src/index.ts:1086-1105 (handler)The handler function that implements the bear_rename_tag tool logic by constructing a Bear x-callback-url for the 'rename-tag' action with old and new tag names, executing it via open command, and returning a success message.private async renameTag(args: any) { const params: Record<string, string | boolean> = { name: args.name, new_name: args.new_name }; if (args.show_window) params.show_window = "yes"; const url = this.buildBearURL("rename-tag", params); await this.executeURL(url); return { content: [ { type: "text", text: `Renamed tag from "${args.name}" to "${args.new_name}"` } ] }; }
- src/index.ts:659-675 (schema)Input schema definition for the bear_rename_tag tool, specifying required 'name' and 'new_name' parameters.inputSchema: { type: "object", properties: { name: { type: "string", description: "Current tag name" }, new_name: { type: "string", description: "New tag name" }, show_window: { type: "boolean", description: "Show Bear window" } }, required: ["name", "new_name"]
- src/index.ts:656-677 (registration)Registration of the bear_rename_tag tool in the ListTools response, including name, description, and input schema.{ name: "bear_rename_tag", description: "Rename an existing tag", inputSchema: { type: "object", properties: { name: { type: "string", description: "Current tag name" }, new_name: { type: "string", description: "New tag name" }, show_window: { type: "boolean", description: "Show Bear window" } }, required: ["name", "new_name"] } },
- src/index.ts:733-734 (registration)Dispatch case in the CallToolRequestSchema handler that routes bear_rename_tag calls to the renameTag method.case "bear_rename_tag": return await this.renameTag(args);