Skip to main content
Glama
bigjeager

Bear App MCP Server

by bigjeager

bear_add_text

Add text to existing notes in Bear App with options to append, prepend, replace content, insert at headers, or use clipboard text.

Instructions

Add text to an existing note

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic for the 'bear_add_text' tool. It constructs parameters from input args, builds a Bear 'add-text' URL, executes it via open command, and returns a success message.
    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 defining parameters and validation for the 'bear_add_text' tool.
    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)
    Switch case registration that dispatches calls to the 'bear_add_text' handler function in the CallToolRequestSchema handler.
    case "bear_add_text": return await this.addText(args);
  • src/index.ts:324-390 (registration)
    Tool registration in the ListToolsRequestSchema response, including name, description, and schema.
    { 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"] } },

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