Skip to main content
Glama
ppiotis
by ppiotis

Clean / dedupe preview

clean_preview

Preview CSV cleaning—trim whitespace, collapse spaces, drop empty rows, deduplicate, normalize case and numbers—without altering the source. Optionally save cleaned copy to csv-insights-output/.

Instructions

Preview cleaning (trim whitespace, collapse spaces, drop empty rows, dedupe, case normalisation, number normalisation) without touching the source. Set save_as to write the cleaned copy to csv-insights-output/ (never overwrites).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseNo
fileYesCSV path relative to the allowed directory (CSV_INSIGHTS_DIR), e.g. 'sales/2026-q3.csv'
dedupeNoRemove exact duplicate rows (case-insensitive)
save_asNoOutput file name (written as csv-insights-output/<name>.csv)
dedupe_onNoTreat rows as duplicates when these columns match
collapse_spacesNo
drop_empty_rowsNoDefault true
trim_whitespaceNoDefault true
normalize_numbersNoColumns where '$1,200.00' becomes '1200'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, and the description adds genuinely useful context beyond them: the source file is never modified, output is written to csv-insights-output/, and writes never overwrite. It is consistent with the annotations (an output write that is non-destructive). It does not explain what happens on a naming collision or whether the write is atomic, but the safety story is clear.

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?

Two dense sentences with zero filler: the operation set leads and the persistence behaviour follows. Every clause maps to an actionable parameter or behavioural fact.

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?

With 9 parameters, a nested case object, and no output schema, the description covers the transforms and the write destination well. It does not say what the preview actually returns (e.g. sample of cleaned rows, row counts, or diff), which is the main gap for a 9-parameter preview tool.

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 coverage is 78% (baseline 3), and the description adds real meaning by enumerating the transforms that map to the boolean/array parameters and by clarifying that save_as writes to csv-insights-output/<name>.csv. It stops short of clarifying interactions such as dedupe vs dedupe_on precedence.

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?

The description names a specific operation (preview cleaning) on a specific resource (CSV data) and enumerates the exact transforms applied (trim, collapse, drop empty rows, dedupe, case/number normalisation). No sibling tool (summarize_csv, profile_csv, query_csv, etc.) performs cleaning, so it is functionally distinct, but the description never names or contrasts those siblings explicitly.

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

Usage Guidelines3/5

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

It conveys the core usage contract: preview mode by default, and set save_as to persist a cleaned copy. However, it gives no explicit when-to-use/when-not guidance and does not say how to move from preview to the cleaned dataset for downstream tools, leaving selection largely implied.

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