Skip to main content
Glama

remove_duplicates

按指定列删除重复行(保留首次出现的行)—— 只回统计,不回数据行。

Instructions

按指定列删除重复行(保留首次出现的行)—— 只回统计,不回数据行。

用途:数据清洗。例如按"订单号"去重,只保留第一次出现的记录。

参数:

  • file_path:工作簿路径

  • columns:按哪些列判重(列名或列字母如 "A");省略则按整行判重

  • sheet:表名(省略则用活动表)

返回:删除行数、剩余行数(物理删除,保留首次出现)。

Input Schema

NameRequiredDescriptionDefault
sheetNo
columnsNo
file_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that this is a '物理删除' (physical deletion) that keeps the first occurrence, and that it '只回统计,不回数据行' (returns stats only, no data). It omits reversibility/permission details, but the destructive nature and return shape are clearly surfaced.

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

Conciseness4/5

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

Front-loaded with the core action, then cleanly sectioned into 用途/参数/返回. No wasted sentences and appropriately sized. Slightly verbose in restating the 'keep first occurrence' point twice.

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?

For a mutation tool with no annotations and no output schema, the description covers operation, all parameters, and the return values (deleted/remaining counts). The main gap is noting whether the change is reversible via siblings like revert_last_write.

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?

Schema coverage is 0%, so the description must compensate fully and does: file_path (workbook path), columns (accepts column names or letters like 'A', omitted = whole-row comparison), and sheet (omitted = active sheet). Every parameter's meaning and default behavior is explained beyond the bare schema.

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

Purpose4/5

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

States a specific verb+resource with scope: '按指定列删除重复行(保留首次出现的行)'. An agent immediately knows this dedupes rows by columns, which is distinct from siblings like filter_count or aggregate. It does not explicitly name a sibling it replaces, keeping it from a 5.

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?

Provides clear usage context: '用途:数据清洗。例如按"订单号"去重'. This tells the agent when the tool applies. However, it gives no when-not conditions or alternatives (e.g. vs compare_sheets), so it stops short of a 5.

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