Skip to main content
Glama

bear_find_duplicates

Read-onlyIdempotent

Identify notes with identical titles and view their IDs and modification dates. Remove duplicates after imports or resolve sync conflicts to keep your Bear notes organized.

Instructions

Find notes with duplicate titles. Returns groups of notes sharing the same title with their IDs and modification dates. Useful for cleaning up after imports or sync conflicts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler definition for bear_find_duplicates tool. buildArgs returns ['duplicates', '--json'] which gets executed via bcli CLI. The output JSON is parsed and returned. No input parameters required.
    bear_find_duplicates: {
      tool: {
        name: "bear_find_duplicates",
        description:
          "Find notes with duplicate titles. Returns groups of notes sharing the same title with their IDs and modification dates. Useful for cleaning up after imports or sync conflicts.",
        inputSchema: {
          type: "object" as const,
          properties: {},
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
      buildArgs: () => ["duplicates", "--json"],
    },
  • Registration: tools object from tools.ts is imported and handlers are looked up by name in the CallToolRequestSchema handler. The buildArgs function is called with parsed input params, then executed via execBcliWithReauth.
    const { name, arguments: input } = request.params;
    const handler = tools[name];
  • Tool listing registration: all tools including bear_find_duplicates are exposed via ListToolsRequestSchema by mapping over Object.values(tools).
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: Object.values(tools).map((t) => t.tool),
    }));
  • Schema: bear_find_duplicates takes no input parameters (empty properties object).
    inputSchema: {
      type: "object" as const,
      properties: {},
    },
  • Helper function that executes the bcli CLI with the buildArgs (['duplicates', '--json']) and handles re-authentication if needed.
    export async function execBcliWithReauth(
      args: string[],
    ): Promise<{ stdout: string; stderr: string }> {
      try {
        return await execBcli(args);
      } catch (error) {
        if (error instanceof AuthError) {
          await performReauth();
          return await execBcli(args);
        }
        throw error;
      }
    }
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds value by disclosing the output format (groups with IDs and dates). No contradictions.

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, no wasted words, front-loaded with purpose. The description is concise yet informative.

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?

Given no parameters and thorough annotations, the description adequately covers the tool's behavior and output. It could mention edge cases (e.g., no duplicates found), but overall it is sufficient.

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?

The input schema has no parameters and 100% schema coverage, so the description need not add parameter meaning. Baseline score of 3 applies.

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 verb 'find', resource 'notes with duplicate titles', and output 'groups with their IDs and modification dates'. It uniquely identifies the tool's function among siblings like bear_find_untagged or bear_search.

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 provides a use case ('cleaning up after imports or sync conflicts') but does not explicitly state when to or not to use this tool versus alternatives, nor does it name specific sibling tools for comparison.

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