Skip to main content
Glama

find_duplicates

Identify similar pattern keys that may need merging by comparing token overlap and prefix matches, flagging candidates for consolidation via alias_pattern.

Instructions

Detect near-identical pattern keys that should probably be merged.

    Compares every pattern against every other using token overlap and
    prefix matching. Flags candidate pairs above the threshold so you
    can apply alias_pattern() to consolidate them. Read-only — this
    tool suggests merges but never performs them.

    A common use case: after a bulk import_patterns() or import_claude_md(),
    call this to catch formatting drift (spacing, casing, punctuation).

    Args:
        threshold: Similarity cutoff, 0.0 to 1.0. Default 0.75. Lower
            thresholds (0.5) over-suggest; higher (0.9) under-suggest.
            Start at default and tune per your noise tolerance.

    Returns:
        Dict with keys: "duplicates" (list of {pattern_a, pattern_b,
        similarity}), "count" (int), "hint" pointing to alias_pattern
        as the next step.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It states 'Read-only — this tool suggests merges but never performs them,' disclosing the behavioral trait. It also outlines the comparison logic and return structure, though more details on limitations could be given.

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 well-structured with clear sections, front-loading the main purpose. It is concise yet informative, with no wasted sentences.

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 tool's simplicity (one parameter, read-only, complete output schema), the description covers all essential aspects: purpose, usage context, parameter semantics, and return value. It references sibling tools appropriately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema coverage is 0%, but the description fully explains the threshold parameter: its range (0.0-1.0), default (0.75), effect on sensitivity, and tuning advice. This adds significant meaning beyond the bare schema.

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's purpose: 'Detect near-identical pattern keys that should probably be merged.' It uses a specific verb ('detect') and resource ('pattern keys'), and the context of merging distinguishes it from sibling tools like alias_pattern.

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 common use case: after bulk import_patterns() or import_claude_md(). It also notes the tool is read-only and suggests using alias_pattern for actual merging. However, it does not explicitly mention when not to use this tool or alternatives.

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/WRG-11/instinct'

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