bear_archive_note
Archive notes in Bear App by ID or search term to organize your workspace and reduce clutter.
Instructions
Archive a note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Note unique identifier | |
| search | No | Search term to find notes to archive | |
| show_window | No | Show Bear window |
Implementation Reference
- src/index.ts:931-949 (handler)The main handler function for the 'bear_archive_note' tool. It constructs parameters from input args, builds a Bear x-callback URL with action 'archive', executes it using the system's 'open' command, and returns a success message.private async archiveNote(args: any) { const params: Record<string, string | boolean> = {}; if (args.id) params.id = args.id; if (args.search) params.search = args.search; if (args.show_window) params.show_window = "yes"; const url = this.buildBearURL("archive", params); await this.executeURL(url); return { content: [ { type: "text", text: `Archived note(s)${args.id ? ` with ID: ${args.id}` : args.search ? ` matching: ${args.search}` : ""}` } ] }; }
- src/index.ts:533-548 (schema)The input schema defining the parameters for the 'bear_archive_note' tool: id (string), search (string), show_window (boolean).type: "object", properties: { id: { type: "string", description: "Note unique identifier" }, search: { type: "string", description: "Search term to find notes to archive" }, show_window: { type: "boolean", description: "Show Bear window" } } }
- src/index.ts:529-549 (registration)The tool registration in the list of available tools returned by ListToolsRequestSchema, including name, description, and inputSchema.{ name: "bear_archive_note", description: "Archive a note", inputSchema: { type: "object", properties: { id: { type: "string", description: "Note unique identifier" }, search: { type: "string", description: "Search term to find notes to archive" }, show_window: { type: "boolean", description: "Show Bear window" } } } },
- src/index.ts:721-722 (registration)The dispatch case in the CallToolRequestSchema handler's switch statement that routes calls to the archiveNote handler method.case "bear_archive_note": return await this.archiveNote(args);