Skip to main content
Glama

bear_context_sync

Idempotent

Sync qualifying Bear notes to the local context library, updating changed notes and removing disqualified ones. Use to refresh or update the context index.

Instructions

Sync qualifying Bear notes to the local context library. Adds new notes, updates changed notes, and removes notes that no longer qualify (tag removed, trashed, etc.). Regenerates the index. Only touches the bear/ directory — external/ and inbox/ are untouched. Call this when the user asks to sync, refresh, or update their context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoForce full re-sync (re-download all notes)

Implementation Reference

  • The full ToolHandler definition for bear_context_sync, including the tool metadata (name, description, inputSchema, annotations) and the buildArgs function that constructs the CLI command ['context', 'sync', '--json'] with an optional '--force' flag.
    bear_context_sync: {
      tool: {
        name: "bear_context_sync",
        description:
          "Sync qualifying Bear notes to the local context library. Adds new notes, updates changed notes, and removes notes that no longer qualify (tag removed, trashed, etc.). Regenerates the index. Only touches the bear/ directory — external/ and inbox/ are untouched. Call this when the user asks to sync, refresh, or update their context.",
        inputSchema: {
          type: "object" as const,
          properties: {
            force: {
              type: "boolean",
              description: "Force full re-sync (re-download all notes)",
            },
          },
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
      buildArgs: (input) => {
        const args = ["context", "sync", "--json"];
        if (input.force) args.push("--force");
        return args;
      },
    },
  • The input schema for bear_context_sync defines a single optional boolean property 'force' to trigger a full re-sync.
    bear_context_sync: {
      tool: {
        name: "bear_context_sync",
        description:
          "Sync qualifying Bear notes to the local context library. Adds new notes, updates changed notes, and removes notes that no longer qualify (tag removed, trashed, etc.). Regenerates the index. Only touches the bear/ directory — external/ and inbox/ are untouched. Call this when the user asks to sync, refresh, or update their context.",
        inputSchema: {
          type: "object" as const,
          properties: {
            force: {
              type: "boolean",
              description: "Force full re-sync (re-download all notes)",
            },
          },
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
      buildArgs: (input) => {
        const args = ["context", "sync", "--json"];
        if (input.force) args.push("--force");
        return args;
      },
    },
  • The tool is registered as a property in the exported 'tools' Record<string, ToolHandler> object at key 'bear_context_sync'.
    export const tools: Record<string, ToolHandler> = {
  • The CallToolRequestSchema handler in index.ts looks up the tool by name from the tools registry and invokes its buildArgs method to construct the CLI command, then executes it via execBcliWithReauth.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: input } = request.params;
      const handler = tools[name];
    
      if (!handler) {
        return {
          content: [{ type: "text", text: `Unknown tool: ${name}` }],
          isError: true,
        };
Behavior4/5

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

The description discloses key behaviors: regenerating index, adding/updating/removing notes, and restricting to bear/ directory. Annotations already indicate idempotency, and the description aligns without 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?

Four sentences, each adding distinct value. Front-loaded with purpose, then scope, then usage guidance. No redundant or unnecessary text.

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 tool with one optional boolean parameter and no output schema, the description covers purpose, scope, and behavioral details. It lacks explicit mention of return value (e.g., status) but that's minor.

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 already documents the force parameter. The description adds no additional detail about parameter behavior 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 explicitly states it syncs qualifying Bear notes to the local context library, with clear actions (add, update, remove) and regeneration of index. It distinguishes from siblings by specifying it only touches the bear/ directory.

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 specifies when to call it: 'when the user asks to sync, refresh, or update their context.' However, it does not explicitly differentiate from the sibling bear_sync tool, which could create ambiguity.

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