Skip to main content
Glama

util_csv_clean

Read-only

CSV clean (auto-fix messy data) — Clean a messy CSV in one call, offline: trims and collapses whitespace, turns null tokens (NA, N/A, null, none, -, #N/A, plus your own nulls=) into blanks, removes empty rows, empty columns and exact duplicate rows, repairs ragged rows, renames headers to unique snake_case (headers=snake|lower|keep), standardizes date columns to YYYY-MM-DD (Jan 5 2024, 1/5/24, 05-01-2024; detects day-first vs month-first per column, dayfirst=1 to force), strips currency symbols, thousands separators and accounting parentheses from numeric columns while keeping ZIP codes and IDs with leading zeros as text, and normalizes yes/no/Y/N columns to true/false. Returns the cleaned CSV, per-column detected types, counts of every change and a sample of before/after edits. Turn steps off with dedupe=0, dates=0, numbers=0, bools=0, dropEmpty=0. Auto-detects comma, tab, semicolon or pipe (delimiter= to force). Up to 20,000 rows. Price: $0.003 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "csv": "<csv>"
    },
    "name": "util_csv_clean"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvYese.g. Customer Name,Signup Date,Amount,ZIP,Active Ann Lee ,Jan 5 2024,"$1,200.50",02134,yes Bob Ray,2/14/2024,(300),37203,N Bob Ray,2/14/2024,(300),37203,N Cy Dow,N/A,45,90210,Y

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare read-only/non-destructive/open-world; the description adds the details that actually matter — hard 20,000-row limit, fully offline execution, exactly which mutations occur (whitespace, nulls, ragged rows, header renames, date/number/bool normalization), irreversibility of the rewrite, and a before/after edit sample in the response. It also discloses a per-call price ($0.003 USDC via x402), which is material to invocation decisions. The 'offline' claim sits awkwardly beside openWorldHint=true, but the blockchain payment path plausibly explains that flag, so this is not a hard contradiction.

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 purpose and every clause carries information, so there is little filler. However, it is a single dense run-on paragraph with stacked parentheticals, and the option toggles would be far more scannable as a short list.

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?

With no output schema, the description carries the return-value burden and does so (cleaned CSV, detected types, change counts, before/after sample), and it covers limits, cost, and defaults. The gap is that the documented toggle parameters are absent from the schema, leaving the actual input contract partially undefined.

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 coverage is 100% for the single `csv` parameter and includes a worked example, so the baseline is 3. The description adds real meaning about the input format (auto-detected comma/tab/semicolon/pipe, leading-zero IDs preserved as text), but it also advertises numerous controls (nulls=, headers=, dayfirst=, dedupe=, dates=, numbers=, bools=, dropEmpty=, delimiter=) that do not appear in the input schema at all, which risks an agent passing unsupported arguments.

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?

States a specific verb and resource ('Clean a messy CSV in one call') and enumerates the exact transformations applied, so an agent can tell it apart from siblings like util_csv_validate or util_csv_profile without opening a schema. The scope ('offline', 'one call') is unambiguous.

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?

Gives clear usage context and per-step opt-outs (dedupe=0, dates=0, numbers=0, bools=0, dropEmpty=0) plus delimiter forcing, which tells the agent how to tailor behavior. It never names an alternative tool or states when NOT to use it (e.g., validation-only vs. cleaning), which keeps it 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources