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"]
      }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool adds text to existing notes, implying mutation, but lacks critical details: it doesn't specify if this requires note permissions, whether changes are reversible, if it affects note metadata, or what happens on failure. For a mutation tool with 14 parameters and no annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's purpose without redundancy or unnecessary elaboration. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (14 parameters, mutation operation, no output schema, and no annotations), the description is inadequate. It doesn't explain behavioral traits, return values, error handling, or usage context. For a tool with this many options and no structured support, the description should provide more guidance to be complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 14 parameters. The description adds no parameter-specific information beyond the tool's general purpose. According to rules, with high schema coverage (>80%), the baseline is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Add text to an existing note' clearly states the action (add text) and target resource (existing note), distinguishing it from sibling tools like 'bear_create_note' (creates new notes) and 'bear_trash_note' (deletes notes). However, it doesn't explicitly differentiate from all siblings (e.g., 'bear_add_file' also adds content to notes), so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., note must exist), exclusions (e.g., not for creating notes), or comparisons to siblings like 'bear_create_note' for new notes or 'bear_add_file' for file attachments. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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