Skip to main content
Glama

check_duplication

Detect exact and near-miss duplicate code blocks in a codebase, using token count and diversity thresholds to report clone groups.

Instructions

Verified T1/T2 clone blocks (ce.dedup-report schema).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNosubpath (default: project root)
min_tokensNoreport threshold (default 50)
min_distinctNodiversity floor: suppress blocks with fewer distinct tokens

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it says nothing about side effects, permissions, cost, or read-only nature. The only behavioral hint is the qualifier 'Verified' (implying a filtered/suppressed set) and the T1/T2 scope, which is thin for an unannotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short, but it is an under-specified noun fragment rather than a front-loaded statement of purpose; there is no leading verb to orient the agent. Brevity here comes from omission, not from efficient structuring.

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

Completeness2/5

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

For a 3-parameter tool with no annotations and no output schema, the description leaves out what the tool returns, what 'T1/T2' means in practice, and how the referenced 'ce.dedup-report' schema should be interpreted. An agent cannot confidently invoke this from the description alone.

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% (path, min_tokens, min_distinct all documented), so baseline 3 applies. The description adds no parameter meaning beyond the schema — notably it does not connect 'Verified' to the min_distinct diversity floor or min_tokens threshold.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names an artifact ('Verified T1/T2 clone blocks') and a schema ('ce.dedup-report'), so the duplication-detection domain is identifiable, but there is no verb and no statement of what the tool actually does (find? report? verify?). Sibling differentiation is absent despite close siblings like 'clone', 'docdup' and 'similar_units'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No when-to-use, when-not-to-use, or alternative routing is given. With 'clone', 'docdup', 'similar_units' and 'check' in the sibling list, the agent has no basis for choosing this tool over those. Not misleading, but zero guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.