bear_rename_tag
Rename an existing tag in Bear App by specifying the current and new tag names. Integrates with MCP Server for efficient note and tag management.
Instructions
Rename an existing tag
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Current tag name | |
| new_name | Yes | New tag name | |
| show_window | No | Show Bear window |
Input Schema (JSON Schema)
{
"properties": {
"name": {
"description": "Current tag name",
"type": "string"
},
"new_name": {
"description": "New tag name",
"type": "string"
},
"show_window": {
"description": "Show Bear window",
"type": "boolean"
}
},
"required": [
"name",
"new_name"
],
"type": "object"
}
Implementation Reference
- src/index.ts:1086-1105 (handler)The main handler function for the 'bear_rename_tag' tool. It constructs parameters for renaming a tag, builds a Bear URL using 'buildBearURL("rename-tag", params)', executes it with 'executeURL', and returns 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-676 (schema)The input schema defining the parameters for the 'bear_rename_tag' tool: required 'name' and 'new_name' strings, optional 'show_window' boolean.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 tools list returned by listTools, including name, description, and 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 in the CallTool request handler switch statement that routes 'bear_rename_tag' calls to the renameTag method.case "bear_rename_tag": return await this.renameTag(args);