Skip to main content
Glama

bear_find_duplicates

Read-onlyIdempotent

Find groups of notes sharing identical titles, each marked with its ID and modification date. Clean up duplicates after imports or sync conflicts.

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

  • The 'bear_find_duplicates' tool handler. The 'buildArgs' function constructs CLI arguments ['duplicates', '--json'] which are executed by execBcliWithReauth. The tool calls the external 'bcli' CLI with 'duplicates --json' to find notes with duplicate titles, returning JSON output that lists groups of duplicate-titled notes with their IDs and modification dates.
    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"],
    },
  • The input schema for bear_find_duplicates defines an empty 'properties' object, meaning no input parameters are required.
    inputSchema: {
      type: "object" as const,
      properties: {},
    },
  • The 'bear_find_duplicates' tool is registered as a property of the exported 'tools' record, which is imported by index.ts and exposed via the MCP ListToolsRequestSchema handler.
    export const tools: Record<string, ToolHandler> = {
  • The execBcliWithReauth function executes the bcli command built by the handler, with automatic re-authentication on auth errors.
    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;
      }
    }
Behavior3/5

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

Annotations already indicate readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds that it returns groups with IDs and modification dates, but does not disclose additional behavioral traits like handling of case sensitivity or empty results.

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?

Three sentences front-loaded with the core action and result, no filler. Every sentence adds value.

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 no output schema, the description adequately covers purpose and return value. It could mention limitations like case-insensitivity, but for a simple read-only tool, it is sufficient.

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?

The tool has no parameters, and schema coverage is 100%. The description does not need to add parameter details; it correctly focuses on the tool's purpose.

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 specifies exactly what the tool does: find notes with duplicate titles, returning groups with IDs and modification dates. It clearly distinguishes from siblings like 'bear_find_untagged' and '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 Guidelines4/5

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

The description provides a clear use case: cleaning up after imports or sync conflicts. While it does not explicitly state when not to use or name alternatives, the context is sufficient for a simple, parameterless tool.

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