Skip to main content
Glama
bigjeager

Bear App MCP Server

by bigjeager

bear_add_text

Add or modify text in Bear App notes using the MCP server tool. Choose modes like append, prepend, or replace, and customize with options like new lines, headers, clipboard text, or timestamps for efficient note management.

Instructions

Add text to an existing note

Input Schema

NameRequiredDescriptionDefault
clipboardNoGet text from clipboard
editNoPlace cursor in note editor
exclude_trashedNoExclude trashed notes
headerNoAdd text to specific header
idNoNote unique identifier
modeNoHow to add the text
new_lineNoForce text on new line when appending
new_windowNoOpen in new window
open_noteNoOpen note after adding text
selectedNoSelected text in note
show_windowNoShow Bear window
textYesText to add
timestampNoPrepend current date and time
titleNoNote title

Input Schema (JSON Schema)

{ "properties": { "clipboard": { "description": "Get text from clipboard", "type": "boolean" }, "edit": { "description": "Place cursor in note editor", "type": "boolean" }, "exclude_trashed": { "description": "Exclude trashed notes", "type": "boolean" }, "header": { "description": "Add text to specific header", "type": "string" }, "id": { "description": "Note unique identifier", "type": "string" }, "mode": { "description": "How to add the text", "enum": [ "append", "prepend", "replace_all", "replace" ], "type": "string" }, "new_line": { "description": "Force text on new line when appending", "type": "boolean" }, "new_window": { "description": "Open in new window", "type": "boolean" }, "open_note": { "description": "Open note after adding text", "type": "boolean" }, "selected": { "description": "Selected text in note", "type": "string" }, "show_window": { "description": "Show Bear window", "type": "boolean" }, "text": { "description": "Text to add", "type": "string" }, "timestamp": { "description": "Prepend current date and time", "type": "boolean" }, "title": { "description": "Note title", "type": "string" } }, "required": [ "text" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'bear_add_text' tool. Processes input arguments, builds the Bear 'add-text' URL scheme parameters, executes the URL via system 'open' command, and returns a textual success response.
    private async addText(args: any) { const params: Record<string, string | boolean> = {}; if (args.id) params.id = args.id; if (args.title) params.title = args.title; if (args.text) params.text = args.text; if (args.mode) params.mode = args.mode; if (args.new_line) params.new_line = "yes"; if (args.header) params.header = args.header; if (args.selected) params.selected = args.selected; if (args.clipboard) params.clipboard = "yes"; if (args.exclude_trashed) params.exclude_trashed = "yes"; if (args.open_note) params.open_note = "yes"; if (args.new_window) params.new_window = "yes"; if (args.show_window) params.show_window = "yes"; if (args.edit) params.edit = "yes"; if (args.timestamp) params.timestamp = "yes"; const url = this.buildBearURL("add-text", params); await this.executeURL(url); return { content: [ { type: "text", text: `Added text to note in Bear${args.mode ? ` using mode: ${args.mode}` : ""}` } ] }; }
  • Input schema definition for the 'bear_add_text' tool, specifying properties like id, title, text (required), mode, and various Bear-specific options.
    type: "object", properties: { id: { type: "string", description: "Note unique identifier" }, title: { type: "string", description: "Note title" }, text: { type: "string", description: "Text to add" }, mode: { type: "string", enum: ["append", "prepend", "replace_all", "replace"], description: "How to add the text" }, new_line: { type: "boolean", description: "Force text on new line when appending" }, header: { type: "string", description: "Add text to specific header" }, selected: { type: "string", description: "Selected text in note" }, clipboard: { type: "boolean", description: "Get text from clipboard" }, exclude_trashed: { type: "boolean", description: "Exclude trashed notes" }, open_note: { type: "boolean", description: "Open note after adding text" }, new_window: { type: "boolean", description: "Open in new window" }, show_window: { type: "boolean", description: "Show Bear window" }, edit: { type: "boolean", description: "Place cursor in note editor" }, timestamp: { type: "boolean", description: "Prepend current date and time" } }, required: ["text"] }
  • src/index.ts:324-390 (registration)
    Tool registration in the ListTools response, defining name, description, and full input schema for 'bear_add_text'.
    { name: "bear_add_text", description: "Add text to an existing note", inputSchema: { type: "object", properties: { id: { type: "string", description: "Note unique identifier" }, title: { type: "string", description: "Note title" }, text: { type: "string", description: "Text to add" }, mode: { type: "string", enum: ["append", "prepend", "replace_all", "replace"], description: "How to add the text" }, new_line: { type: "boolean", description: "Force text on new line when appending" }, header: { type: "string", description: "Add text to specific header" }, selected: { type: "string", description: "Selected text in note" }, clipboard: { type: "boolean", description: "Get text from clipboard" }, exclude_trashed: { type: "boolean", description: "Exclude trashed notes" }, open_note: { type: "boolean", description: "Open note after adding text" }, new_window: { type: "boolean", description: "Open in new window" }, show_window: { type: "boolean", description: "Show Bear window" }, edit: { type: "boolean", description: "Place cursor in note editor" }, timestamp: { type: "boolean", description: "Prepend current date and time" } }, required: ["text"] } },
  • src/index.ts:709-710 (registration)
    Dispatch case in the CallToolRequestSchema handler switch statement, routing 'bear_add_text' calls to the addText method.
    case "bear_add_text": return await this.addText(args);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bigjeager/bear-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server