Skip to main content
Glama

drop_duplicates

Removes duplicate rows from a DataFrame, optionally targeting specific columns and choosing which duplicates to retain (first, last, or none). Use early to prevent biased statistics and models.

Instructions

Remove duplicate rows. subset: columns to check (None = all). keep: 'first', 'last', or 'none' (drop all duplicates). Run early in pipeline, right after EDA. Duplicates inflate statistics and bias models. Example: drop_duplicates(subset=["col1","col2"], keep="first")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keepNofirst
subsetNo
df_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description bears full responsibility for disclosing behavior. It explains the effect of subset and keep parameters, but fails to mention whether the operation modifies the input dataframe in place or returns a new one. This is a significant behavioral gap for a data manipulation tool, especially given the df_name parameter.

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: it states the core action first, then parameter definitions, a usage tip, and an example. Every sentence adds value, and there is no redundant or filler content.

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

Completeness3/5

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

For a tool with no annotations and an output schema, the description covers the main functionality but misses important contextual details such as the meaning of df_name and whether the operation is in-place or returns a new dataframe. These omissions could lead an agent to use the tool incorrectly, though the example and usage tip mitigate some ambiguity.

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 description explicitly explains two of the three parameters: subset ('columns to check (None = all)') and keep ('first', 'last', or 'none'). It also provides a concrete example demonstrating usage. However, the df_name parameter is left unexplained, which is a gap since the schema provides no description. Overall, the core parameters are well covered.

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 begins with 'Remove duplicate rows,' a specific verb and resource that clearly identifies the tool's function. This distinguishes it from sibling tools like drop_columns or drop_missing, and the additional explanation about subset and keep parameters reinforces its unique purpose.

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 clear guidance on when to use the tool: 'Run early in pipeline, right after EDA,' and explains why duplicates are problematic ('Duplicates inflate statistics and bias models'). While it does not explicitly state when not to use it or mention alternatives, the context is sufficiently clear for an agent to decide appropriately.

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/AstyanM/mcp-data-science'

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