Skip to main content
Glama

bear_search

Read-onlyIdempotent

Search across Bear note titles, tags, and body content. Returns ranked results with text snippets, including locked notes indication.

Instructions

Full-text search across Bear note titles, tags, and body content. Returns matching notes ranked by relevance (title matches first, then tag, then body). Body matches include a text snippet with surrounding context. Locked/private notes will match by title but may not match body searches — results include 'locked: true' for these notes. If you can't find content you expect, try listing notes to check if the relevant note is locked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query text
limitNoMaximum number of results (default 20)
sinceNoOnly notes modified after this date (YYYY-MM-DD, or: today, yesterday, last-week, last-month)
beforeNoOnly notes modified before this date (YYYY-MM-DD)

Implementation Reference

  • Definition and input schema for the bear_search tool. Defines the ToolHandler entry with tool name, description, inputSchema (query, limit, since, before), and annotations.
    bear_search: {
      tool: {
        name: "bear_search",
        description:
          "Full-text search across Bear note titles, tags, and body content. Returns matching notes ranked by relevance (title matches first, then tag, then body). Body matches include a text snippet with surrounding context. Locked/private notes will match by title but may not match body searches — results include 'locked: true' for these notes. If you can't find content you expect, try listing notes to check if the relevant note is locked.",
        inputSchema: {
          type: "object" as const,
          properties: {
            query: {
              type: "string",
              description: "Search query text",
            },
            limit: {
              type: "number",
              description: "Maximum number of results (default 20)",
            },
            since: {
              type: "string",
              description:
                "Only notes modified after this date (YYYY-MM-DD, or: today, yesterday, last-week, last-month)",
            },
            before: {
              type: "string",
              description:
                "Only notes modified before this date (YYYY-MM-DD)",
            },
          },
          required: ["query"],
        },
  • buildArgs handler for bear_search. Constructs the CLI arguments: 'search', the query string, '--json', and optional '--limit', '--since', '--before'. This is the function that executes the tool logic by building the command-line invocation for the bcli binary.
      buildArgs: (input) => {
        const args = ["search", String(input.query), "--json"];
        if (input.limit) args.push("--limit", String(input.limit));
        if (input.since) args.push("--since", String(input.since));
        if (input.before) args.push("--before", String(input.before));
        return args;
      },
    },
  • Registration of all tools via ListToolsRequestSchema and CallToolRequestSchema handlers. The bear_search tool is registered as part of the 'tools' object exported from tools.ts, listed via Object.values(tools).map(t => t.tool), and called via handler.buildArgs(params).
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: Object.values(tools).map((t) => t.tool),
    }));
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds behavioral details: ranking order, locked note handling, and result fields, providing value beyond annotations.

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 (4 sentences) and front-loaded with the core action. Every sentence adds value without unnecessary detail.

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 the absence of an output schema, the description covers return values (relevance, snippets, locked flag) and edge cases (locked notes). It is complete for a search tool.

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 coverage is 100%, so parameters are well-documented. The description does not add additional parameter-specific information beyond what the schema provides.

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 the tool performs full-text search across Bear note titles, tags, and body content, returning ranked results. It distinguishes itself from siblings like bear_list_notes by specifying the search scope and ranking logic.

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

Usage Guidelines4/5

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

The description provides usage context, including how locked notes behave and a troubleshooting tip. However, it does not explicitly state when not to use this tool or mention alternatives like bear_list_notes.

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/KuvopLLC/better-bear'

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