Skip to main content
Glama

clean_filter

Filter rows in a dataset by SQL condition, either dropping or keeping matches to clean and prepare data for analysis.

Instructions

New source with rows matching where_sql dropped (default) or kept.

    `where_sql` is a DuckDB WHERE clause without the WHERE keyword:
    e.g. `"age < 0 OR age > 130"` or `"region IS NULL"`. Defaults to
    drop-matching (filter-out semantics); pass `keep=True` to keep instead.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keepNo
aliasNo
source_idYes
where_sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses that a new source is produced (implying non-destructive), the default drop behavior, and the `keep=True` switch. It includes DuckDB-specific syntax details. It does not cover edge cases or the purpose of `alias`, but the core behavior is well communicated.

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?

The description is compact and well-structured: it leads with the purpose, then gives concrete `where_sql` examples and parameter defaults. No filler words; every sentence adds value.

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?

The description covers the essential behavior, syntax, and default semantics, which is sufficient for a tool of moderate complexity. The existence of an output schema means return values need not be explained. The only notable omission is the `alias` parameter, but overall it is adequate.

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 0%, placing the burden on the description. It thoroughly explains `where_sql` with examples and the `keep` default. `source_id` is implied as the input, but `alias` is not mentioned at all. Thus the description compensates for the most important parameters but leaves a gap for `alias`.

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 clearly states the tool creates a new source by dropping (default) or keeping rows that match a `where_sql` expression. This specific verb+resource pairing distinguishes it from sibling clean_* tools like clean_drop_duplicates or clean_drop_columns, which target duplicates or columns rather than arbitrary row filters.

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?

The description provides clear usage context, including exact `where_sql` syntax, examples, and the effect of the `keep` parameter. However, it does not explicitly mention alternative tools or when not to use this tool, so it stops short of full guidance.

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/charliecpeterson/edamcp'

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