bear_archive_note
Archive a Bear note to hide it from the main list; use undo to unarchive.
Instructions
Archive a Bear note. Archived notes are hidden from the main list but not deleted. Use 'undo' to unarchive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Note ID (uniqueIdentifier) | |
| undo | No | Unarchive the note instead of archiving |
Implementation Reference
- mcp-server/src/tools.ts:527-531 (handler)The handler function that builds CLI arguments for the bear_archive_note tool. It calls the 'archive' subcommand with the note ID and optional '--undo' flag.
buildArgs: (input) => { const args = ["archive", String(input.id), "--json"]; if (input.undo) args.push("--undo"); return args; }, - mcp-server/src/tools.ts:502-526 (schema)The tool definition and input schema for bear_archive_note. Accepts an 'id' (required) and an optional 'undo' boolean. Marked idempotent.
bear_archive_note: { tool: { name: "bear_archive_note", description: "Archive a Bear note. Archived notes are hidden from the main list but not deleted. Use 'undo' to unarchive.", inputSchema: { type: "object" as const, properties: { id: { type: "string", description: "Note ID (uniqueIdentifier)", }, undo: { type: "boolean", description: "Unarchive the note instead of archiving", }, }, required: ["id"], }, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, }, }, - mcp-server/src/index.ts:33-35 (registration)Registration in index.ts: the CallToolRequestHandler dispatches to the tool by name from the tools record, which includes bear_archive_note.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: input } = request.params; const handler = tools[name]; - mcp-server/src/index.ts:29-31 (registration)Registration in index.ts: the ListToolsRequestSchema handler exposes all tools (including bear_archive_note) to the MCP client.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: Object.values(tools).map((t) => t.tool), }));