Skip to main content
Glama

bear_context_search

Read-onlyIdempotent

Search across Bear notes, external files, and inbox to locate matching text snippets with filenames and origin labels when the index alone is insufficient.

Instructions

Full-text search across the entire context library (Bear notes + external files + inbox). Returns matching snippets with filenames and origin labels. Use when the index alone isn't enough to find the right file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (case-insensitive substring match)
limitNoMaximum results (default: 5)

Implementation Reference

  • Tool definition for bear_context_search, including inputSchema (schema) and buildArgs (handler logic that builds CLI args for the bcli tool).
    bear_context_search: {
      tool: {
        name: "bear_context_search",
        description:
          "Full-text search across the entire context library (Bear notes + external files + inbox). Returns matching snippets with filenames and origin labels. Use when the index alone isn't enough to find the right file.",
        inputSchema: {
          type: "object" as const,
          properties: {
            query: {
              type: "string",
              description: "Search query (case-insensitive substring match)",
            },
            limit: {
              type: "number",
              description: "Maximum results (default: 5)",
            },
          },
          required: ["query"],
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
      buildArgs: (input) => {
        const args = ["context", "search", String(input.query), "--json"];
        if (input.limit) args.push("--limit", String(input.limit));
        return args;
      },
    },
Behavior3/5

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

Annotations already convey read-only, non-destructive, idempotent behavior. Description adds context about what is searched (full-text across context library) but does not disclose additional behavioral traits like ordering, pagination, or result format beyond 'snippets with filenames and origin labels.'

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?

Two sentences: first defines functionality, second offers usage guidance. No redundant words, efficient and front-loaded.

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

Completeness4/5

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

For a simple read-only search tool with two parameters and no output schema, the description covers purpose and usage condition adequately. Missing details about return format specifics or ordering, but the tool is straightforward and the description is sufficiently 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 coverage is 100% with descriptions for both parameters. Description does not add extra meaning to query or limit beyond what schema provides, so baseline of 3 is appropriate.

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?

Description states specific verb (full-text search) and resource (entire context library: Bear notes, external files, inbox). Distinguishes from siblings like bear_search by scope and mentions return of snippets with filenames and origin labels.

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?

Explicitly says 'Use when the index alone isn't enough,' providing a clear condition for use. Implies an alternative tool (index-based search) but does not name it or specify when not to use.

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

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