Skip to main content
Glama
xlsx-for-ai

xlsx-for-ai

by senoff

xlsx_data_clean

Destructive

Scan .xlsx files for data-quality issues such as NA variants, merged-cell residue, type-coercion errors, stray rows, mojibake, and duplicate headers, then flag or fix them.

Instructions

Use this when you need to scan for the common data-grime issues (NA variants, merged-cell residue, type-coercion mistakes, stray header/footer rows, mojibake, duplicate headers) and either flag or fix them.

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": {
      "file_path": "<file_path>"
    },
    "name": "xlsx_data_clean"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNodiagnose (default): return findings only, file untouched. execute: apply deterministic fixes; cleaned bytes returned in _meta.file_b64.
sheetsNoRestrict to these sheet names. Default: all sheets.
optionsNoDetector tunables.
out_pathNoOptional save path for cleaned output (execute mode).
detectorsNoSubset of detectors to run. Default: all 7 (na_variant, merged_cell_residue, type_coercion_mistake, trailing_row_noise, header_row_not_first, encoding_glitch, duplicate_header).
file_pathYesAbsolute path to the .xlsx file. Pass the path string AS-IS — do NOT read, open, or base64-encode the file; the client handles all file I/O. The base64 surface in this connector is OUTPUT-only (_meta.file_b64).
overridesNoPer-detector / per-scope skip / flag_only / force overrides.
accept_findingsNoExecute mode only — finding IDs to apply. Default: all.
reject_findingsNoExecute mode only — finding IDs to skip.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed22 schema fields changedv4.3.1
    • addedInput schema / properties / accept_findings / description
      Added value: +"Execute mode only — finding IDs to apply. Default: all."
    • addedInput schema / properties / detectors / description
      Added value: +"Subset of detectors to run. Default: all 7 (na_variant, merged_cell_residue, type_coercion_mistake, trailing_row_noise, header_row_not_first, encoding_glitch, duplicate_header)."
    • removedInput schema / properties / file_b64
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "Absolute path to the .xlsx file. Pass the path string AS-IS — do NOT read, open, or base64-encode the file; the client handles all file I/O. The base64 surface in this connector is OUTPUT-only (_meta.file_b64).",
      +  "type": "string"
      +}
    • addedInput schema / properties / mode / description
      Added value: +"diagnose (default): return findings only, file untouched. execute: apply deterministic fixes; cleaned bytes returned in _meta.file_b64."
    • removedInput schema / properties / options / additionalProperties
      Removed value: -false
    • addedInput schema / properties / options / description
      Added value: +"Detector tunables."
    • addedInput schema / properties / options / properties / header_scan_depth / description
      Added value: +"Rows to scan for header inference (default 10)."
    • addedInput schema / properties / options / properties / na_canonical / description
      Added value: +"Replacement value for NA tokens. \"\" (default), \"null\", \"(blank)\", or any string."
    • addedInput schema / properties / options / properties / trailing_threshold / description
      Added value: +"Min consecutive noise rows to flag (default 3)."
    • addedInput schema / properties / out_path
      Added value: +{
      +  "description": "Optional save path for cleaned output (execute mode).",
      +  "type": "string"
      +}
    • addedInput schema / properties / overrides / description
      Added value: +"Per-detector / per-scope skip / flag_only / force overrides."
    • removedInput schema / properties / overrides / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / overrides / items / properties / params
      Removed value: -{
      -  "type": "object"
      -}
    • removedInput schema / properties / overrides / items / properties / scope / additionalProperties
      Removed value: -false
    • addedInput schema / properties / overrides / items / properties / scope / properties / column_letter / description
      Added value: +"A-Z column letter; alternative to region."
    • removedInput schema / properties / overrides / items / properties / scope / properties / region / additionalProperties
      Removed value: -false
    • removedInput schema / properties / overrides / items / properties / scope / properties / region / required
      Removed value: -[
      -  "bottom_right",
      -  "top_left"
      -]
    • changedInput schema / properties / overrides / items / required
      Previous value: -[
      -  "action",
      -  "detector",
      -  "scope"
      -]New value: +[
      +  "detector",
      +  "scope",
      +  "action"
      +]
    • addedInput schema / properties / reject_findings / description
      Added value: +"Execute mode only — finding IDs to skip."
    • addedInput schema / properties / sheets / description
      Added value: +"Restrict to these sheet names. Default: all sheets."
    • changedInput schema / required
      Previous value: -[
      -  "file_b64"
      -]New value: +[
      +  "file_path"
      +]
  2. First observedv3.2.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the risk profile is known without the description. The description adds the useful nuance that you can stop at flagging rather than fixing, but it does not state whether the source file is modified, that execute emits cleaned bytes via _meta.file_b64, or that findings IDs mediate the two-phase workflow.

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?

A single front-loaded sentence that leads with the trigger and packs the detector list into one parenthetical, with no filler. It is dense but readable; the only cost is that the long enumeration makes it slightly run-on.

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 nine-parameter, nested, destructive tool with no output schema, one sentence plus rich annotations and schema is enough to invoke it correctly, but not enough to explain the intended diagnose-then-execute lifecycle or the accept/reject finding-ID workflow that the parameters imply.

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% and the nine parameters, including the nested overrides object and the mode enum, are documented in detail there. The description contributes nothing parameter-specific, so the schema does all the work and the baseline of 3 applies.

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 specific verb pair (scan, then flag or fix) against a clearly named resource, and enumerates the exact defect classes it targets (NA variants, merged-cell residue, type-coercion mistakes, stray header/footer rows, mojibake, duplicate headers). This is far more concrete than a generic 'clean Excel data' label, though it never names a sibling (e.g. xlsx_doctor, xlsx_healer_diagnose) to mark the boundary.

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?

The 'Use this when you need to scan for...' framing gives a usable trigger condition, but there are no exclusions and no routing to the many adjacent siblings that also diagnose or repair workbooks. The 'flag or fix' phrasing also implies a mode choice without saying when to prefer diagnose over execute, leaving that to the schema.

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