Skip to main content
Glama

bear_create_note

Create a new Bear note with title, body, tags, and YAML front matter. Inline hashtags are extracted as real tags; hierarchical tags index ancestors. Returns the note ID.

Instructions

Create a new Bear note with a title, optional body text, tags, and YAML front matter. Hashtags written inline in the body (e.g. '#my_tag' or '#parent/child') are extracted and registered as real tags on the note, matching Bear's desktop-app behaviour. Tags from the 'tags' array are indexed regardless of whether they appear in the body. Hierarchical tags like '#parent/child' also index every ancestor (so they show up under #parent in Bear's sidebar). Front matter is stored as a collapsed metadata block at the top of the note. Returns the new note's ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesNote title
bodyNoNote body text (markdown)
tagsNoTags to assign to the note
frontmatterNoYAML front matter fields as key-value pairs (e.g. {status: 'draft', project: 'alpha'})

Implementation Reference

  • Registration of the bear_create_note tool as part of the tools registry, exported from tools.ts and consumed by index.ts
    bear_create_note: {
      tool: {
        name: "bear_create_note",
        description:
          "Create a new Bear note with a title, optional body text, tags, and YAML front matter. Hashtags written inline in the body (e.g. '#my_tag' or '#parent/child') are extracted and registered as real tags on the note, matching Bear's desktop-app behaviour. Tags from the 'tags' array are indexed regardless of whether they appear in the body. Hierarchical tags like '#parent/child' also index every ancestor (so they show up under #parent in Bear's sidebar). Front matter is stored as a collapsed metadata block at the top of the note. Returns the new note's ID.",
        inputSchema: {
          type: "object" as const,
          properties: {
            title: {
              type: "string",
              description: "Note title",
            },
            body: {
              type: "string",
              description: "Note body text (markdown)",
            },
            tags: {
              type: "array",
              items: { type: "string" },
              description: "Tags to assign to the note",
            },
            frontmatter: {
              type: "object",
              description:
                "YAML front matter fields as key-value pairs (e.g. {status: 'draft', project: 'alpha'})",
              additionalProperties: { type: "string" },
            },
          },
          required: ["title"],
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
        },
      },
      buildArgs: (input) => {
        const args = ["create", String(input.title), "--json"];
        if (input.body) args.push("--body", String(input.body));
        if (Array.isArray(input.tags) && input.tags.length > 0) {
          args.push("--tags", input.tags.join(","));
        }
        if (input.frontmatter && typeof input.frontmatter === "object") {
          const fm = input.frontmatter as Record<string, string>;
          args.push(
            "--fm",
            ...Object.entries(fm).map(([k, v]) => `${k}=${v}`),
          );
        }
        return args;
      },
    },
  • Input schema for bear_create_note: title (required), body (optional), tags (optional string array), frontmatter (optional string-string object)
    inputSchema: {
      type: "object" as const,
      properties: {
        title: {
          type: "string",
          description: "Note title",
        },
        body: {
          type: "string",
          description: "Note body text (markdown)",
        },
        tags: {
          type: "array",
          items: { type: "string" },
          description: "Tags to assign to the note",
        },
        frontmatter: {
          type: "object",
          description:
            "YAML front matter fields as key-value pairs (e.g. {status: 'draft', project: 'alpha'})",
          additionalProperties: { type: "string" },
        },
      },
      required: ["title"],
    },
  • Handler logic: builds CLI arguments for 'bcli create' command with optional --body, --tags, and --fm flags based on input parameters
    buildArgs: (input) => {
      const args = ["create", String(input.title), "--json"];
      if (input.body) args.push("--body", String(input.body));
      if (Array.isArray(input.tags) && input.tags.length > 0) {
        args.push("--tags", input.tags.join(","));
      }
      if (input.frontmatter && typeof input.frontmatter === "object") {
        const fm = input.frontmatter as Record<string, string>;
        args.push(
          "--fm",
          ...Object.entries(fm).map(([k, v]) => `${k}=${v}`),
        );
      }
      return args;
    },
  • MCP server registration: all tools (including bear_create_note) are listed via ListToolsRequestSchema and invoked via CallToolRequestSchema, which looks up the tool by name from the tools registry
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: Object.values(tools).map((t) => t.tool),
    }));

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.26

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses important behavioral traits beyond annotations: inline hashtag extraction, hierarchical tag indexing, front matter as collapsed metadata, and return of note ID. Annotations only provide readOnlyHint, destructiveHint, idempotentHint, which are correctly set, and no contradiction.

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 concise with no extraneous sentences. Each sentence adds value, and the primary purpose is front-loaded.

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

Completeness5/5

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

Given no output schema, the description specifies the return value (note ID). It covers all key aspects: creation, parameter details, and edge cases like inline tags and front matter, making it complete for an agent.

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

Parameters4/5

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

Schema coverage is 100%, but description adds meaning beyond schema: explains inline hashtag behavior, hierarchical indexing, and front matter storage. This enriches understanding of how parameters interact.

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

Purpose5/5

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

The description clearly states 'Create a new Bear note' with a specific verb and resource, and lists what can be included (title, body, tags, frontmatter). It distinguishes from siblings like bear_edit_note and bear_add_tag by focusing on creation.

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

Usage Guidelines3/5

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

The description implies the tool is for creating notes but does not explicitly state when to use it versus alternative tools like bear_edit_note or bear_add_tag. No exclusions or alternatives are mentioned.

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