Skip to main content
Glama

Metis · Data Analyst — Clean Dataset

clean_dataset

Apply cleaning operations to a dataset—remove duplicates, fill nulls, rename columns—and write a cleaned copy to a new file without modifying the original.

Instructions

Apply cleaning operations to a dataset and write a new file.

NEVER modifies the original file. Always writes to output_path.

⚠️ Writing a dataset requires authorization. This tool refuses to write
unless authorized=True (confirm with the user first) or the env var
METIS_ALLOW_DATA_WRITE=1 is set. This mirrors the Claude Code write-gate so
a rebuild can't bypass it via MCP.

Supported operations:
  - "drop_duplicates"                    — remove exact duplicate rows
  - "drop_columns:[col1:col2:...]"       — remove specified columns
  - "fill_na:[col:value]"                — fill nulls in col with value
  - "rename_column:[old_name:new_name]"  — rename a column
  - "strip_whitespace"                   — strip leading/trailing spaces from all string columns
  - "standardize_dates:[col:format]"     — parse col as date (format: 'auto' or strftime)
  - "drop_na_rows:[col]"                 — drop rows where col is null
  - "drop_na_rows_any"                   — drop rows with ANY null value

Args:
    path:         Absolute local path to the source dataset.
    operations:   List of operation strings (see above).
    output_path:  Where to write the cleaned file. If empty, appends '_cleaned'
                  before the extension (e.g. data.csv → data_cleaned.csv).

Returns JSON with: output_path, original_shape, cleaned_shape, row_delta,
col_delta, operations_applied, operations_skipped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
authorizedNo
operationsYes
output_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations present, so description carries full burden. It discloses no modification of original, authorization gate, and lists all supported operations with format examples. Returns expected output fields are noted.

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 purpose, uses bullet points for operations, clearly highlights authorization. Slightly verbose but every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With output schema provided, description covers all necessary behavioral and operational details: never modifies original, authorization gate, all operations, parameter semantics. Fully equips agent to use tool correctly.

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%, but description provides detailed meaning for each parameter: path (absolute path), authorized (boolean with auth flow explained), operations (list with examples), output_path (default behavior when empty).

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?

The description states 'Apply cleaning operations to a dataset and write a new file' with a specific verb and resource. It distinguishes from siblings by focusing on execution vs. suggestion (suggest_cleaning) and other data tools.

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?

Clearly explains never modifies original, always writes to output path, and authorization requirements. However, lacks explicit when-to-use vs. alternative tools like suggest_cleaning or profile_dataset.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SVerITG/Metis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server