Skip to main content
Glama

clean

Read-onlyIdempotent

Fix messy spreadsheet data without code: trim spaces, correct case, replace values, split/merge columns, fill blanks, convert text to numbers/dates, and remove duplicates. Preview before saving.

Instructions

Fix messy data without writing code: trim spaces, fix case, find/replace, split/merge columns, fill down blanks (merged-cell exports), numbers stored as text, mixed date formats, empty rows and duplicates. Previews by default; pass output to save.

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": {
      "source": "<source>",
      "operations": "<operations>"
    },
    "name": "clean"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return (default from server config, usually 100).
sheetNoSheet name (or 0-based index). Default: first sheet.
formatNojson = rows as arrays, records = list of objects, markdown = a table.json
outputNoSave the cleaned table here. The SAME xlsx file cleans the sheet in place (styles, tables and other sheets kept; backup made). Omit to preview.
sourceYesData file; for a specific sheet use 'book.xlsx#Sheet1' or the sheet parameter.
operationsYesSteps applied in order. Each is {'op': ..., options}. Ops: trim {columns?, collapse_spaces?} | case {mode: upper|lower|title, columns?} | replace {find, replace, columns?, regex?, whole_cell?} | split {column, sep, into: [names]} | merge {columns, into, sep} | fill_down {columns} | fill_null {columns, value} | to_number {columns, decimal?: '.'|','} | to_date {columns, format?, dayfirst?} | drop_empty_rows | dedupe {columns?, keep?: first|last} | drop_columns {columns} | keep_columns {columns} | rename {mapping} | filter {where} | sort {order_by} | add_column {name, expr}. Text ops default to all text columns.
output_sheetNoWhen output is an existing .xlsx: write into this sheet (replaced if it exists), keeping other sheets.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.3/5.0
Behavior2/5

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

The description discloses real behavior the annotations do not: default preview mode, and that supplying output commits changes (schema adds that in-place xlsx edits keep styles/other sheets and make a backup). But this write-on-output behavior conflicts with the supplied readOnlyHint=true, so an agent relying on the annotations would treat a file-mutating call as side-effect free. The description's disclosure is correct; the contradiction is a serious mismatch that undercuts annotation trust.

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?

Two sentences, benefit and capability list first, the preview/commit rule front-loaded at the end with no filler. The enumeration is long but each item maps to a real operation, so it earns its space; a bulleted or grouped form would read slightly better.

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 7-parameter, nested-operations tool the description covers the core mental model (operations run as steps, preview vs save) and the schema supplies per-parameter detail, so nothing critical is missing. It stops short of clarifying output/return shape in preview mode or how operation ordering failures are reported, which is reasonable given no output schema.

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 description coverage is 100%, so every parameter including the operation catalogue is already documented in structured form, which sets the baseline at 3. The description restates the operation families rather than adding semantics (ordering, defaults, error behavior for bad ops) beyond the 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?

Uses a concrete verb phrase ('Fix messy data') backed by an enumerated capability list (trim, case, replace, split/merge, fill_down, to_number, to_date, dedupe, drop empties) that makes the tool's scope unmistakable. It does not name a sibling such as transform or format_range to delineate boundaries, so the agent must infer the split between 'clean' and general 'transform'.

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?

'Previews by default; pass output to save' is genuinely useful usage guidance about the preview/commit decision. However, there is no when-to-use vs when-not guidance relative to alternatives (transform, combine, format_range, query), and no stated precondition that the source must be a tabular file.

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