bear_create_note
Create and customize notes in Bear App with titles, content, tags, attachments, and options to pin, timestamp, or open in new windows. Integrates via MCP Server for streamlined note management.
Instructions
Create a new note in Bear
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clipboard | No | Get text from clipboard | |
| edit | No | Place cursor in note editor | |
| file | No | File path to add to note | |
| filename | No | Custom filename for attached file | |
| float | No | Float note window | |
| new_window | No | Open in new window | |
| open_note | No | Open note after creation | |
| pin | No | Pin note to top of list | |
| show_window | No | Show Bear window | |
| tags | No | Comma-separated list of tags | |
| text | No | Note content | |
| timestamp | No | Prepend current date and time | |
| title | No | Note title | |
| type | No | Note type | |
| url | No | URL to include in note |
Implementation Reference
- src/index.ts:781-813 (handler)The handler function that executes the bear_create_note tool logic. It maps input arguments to Bear URL parameters and invokes the 'create' action via executeWithCallback, returning the note data.private async createNote(args: any) { const params: Record<string, string | boolean> = {}; if (args.title) params.title = args.title; if (args.text) params.text = args.text; if (args.tags) params.tags = args.tags; if (args.pin) params.pin = "yes"; if (args.timestamp) params.timestamp = "yes"; if (args.clipboard) params.clipboard = "yes"; if (args.file) params.file = args.file; if (args.filename) params.filename = args.filename; if (args.open_note) params.open_note = "yes"; if (args.new_window) params.new_window = "yes"; if (args.float) params.float = "yes"; if (args.show_window) params.show_window = "yes"; if (args.edit) params.edit = "yes"; if (args.type) params.type = args.type; if (args.url) params.url = args.url; const noteData = await this.executeWithCallback("create", params); return { content: [ { type: "text", text: JSON.stringify({ message: `Created new note in Bear${args.title ? ` with title: ${args.title}` : ""}`, note: noteData }, null, 2) } ] }; }
- src/index.ts:255-323 (schema)The input schema and metadata for the bear_create_note tool, defining parameters like title, text, tags, etc.{ name: "bear_create_note", description: "Create a new note in Bear", inputSchema: { type: "object", properties: { title: { type: "string", description: "Note title" }, text: { type: "string", description: "Note content" }, tags: { type: "string", description: "Comma-separated list of tags" }, pin: { type: "boolean", description: "Pin note to top of list" }, timestamp: { type: "boolean", description: "Prepend current date and time" }, clipboard: { type: "boolean", description: "Get text from clipboard" }, file: { type: "string", description: "File path to add to note" }, filename: { type: "string", description: "Custom filename for attached file" }, open_note: { type: "boolean", description: "Open note after creation" }, new_window: { type: "boolean", description: "Open in new window" }, float: { type: "boolean", description: "Float note window" }, show_window: { type: "boolean", description: "Show Bear window" }, edit: { type: "boolean", description: "Place cursor in note editor" }, type: { type: "string", description: "Note type" }, url: { type: "string", description: "URL to include in note" } } } },
- src/index.ts:707-708 (registration)The switch case that registers and dispatches bear_create_note calls to the createNote handler.case "bear_create_note": return await this.createNote(args);