Skip to main content
Glama

duplicate_detection

Detect duplicate rows in a database table by specifying columns to check for duplicates. Returns duplicate records for data cleaning.

Instructions

Detect duplicate rows in a table based on specified columns.

LEVEL: Table ↔ Column (requires table and columns parameters)

USE FOR: finding duplicates, duplicate rows, "are there duplicate emails?", detecting duplicate records, data deduplication analysis. DO NOT USE FOR: general data quality (use data_quality_report), schema structure (use get_schema), null analysis (use data_quality_report with include='nulls').

Examples: duplicate_detection(table='users', columns='email', schema='public') duplicate_detection(table='orders', columns='customer_id,product_id', schema='shipment')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name to check
columnsYesComma-separated column names (e.g., 'email,name')
schemaNoSchema containing the table. REQUIRED. Use get_schema() to list available schemas.
formatNoOutput format: 'json' or 'markdown'json
urlNoDatabase URL for auto-connection

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It explains the tool's purpose and usage but does not disclose behavioral traits like output format details, read-only nature, performance considerations, or error behavior. The examples and level help, but more behavioral context is needed.

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 concise and well-structured: purpose statement, level note, use/not-use list, and examples. Every sentence serves a purpose and there is no fluff.

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 the tool has 5 parameters (2 required) and an output schema, the description covers the core function, usage guidelines, and examples. It does not describe the output schema, but the rule states this is acceptable since the output schema exists. The description could mention the 'url' parameter, but overall it is adequate.

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?

Schema description coverage is 100%, so baseline is 3. The description adds value by including example parameter values (table='users', columns='email') and noting that columns are comma-separated. It reinforces required parameters and provides context beyond the 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 detects duplicate rows in a table based on specified columns. It provides a specific verb-resource pair, and the USE FOR/DO NOT USE FOR list distinguishes it from sibling tools like data_quality_report and get_schema.

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

Usage Guidelines5/5

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

The description includes explicit USE FOR and DO NOT USE FOR sections with alternative tool names, plus a level indicator and example invocations. This gives clear guidance on when and when not to use the 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/snss10/DBeast'

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