Skip to main content
Glama

filter_rows

Filter rows by a column condition using operators: ==, !=, >, <, >=, <=, contains, isin. Subset data or remove invalid rows.

Instructions

Filter rows by condition. Operators: ==, !=, >, <, >=, <=, contains, isin. For isin: provide comma-separated values. Value is auto-cast for numeric columns. Use to subset data or remove invalid rows. WARNING: modifies in-place. Use copy_dataframe first if you need the full dataset later. Example: filter_rows(column="Revenue", operator=">", value="1000") Example: filter_rows(column="CargoType", operator="isin", value="GCR,SCR")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
columnYes
df_nameNo
operatorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Despite lacking annotations, the description proactively discloses the in-place mutation behavior, the auto-casting of values for numeric columns, and the isin operator format. This is essential safety information for users.

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, starting with the core operation, then enumerating operators, providing formatting details for isin, a warning, and two illustrative examples. 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 behaviors: supported operators, isin formatting, numeric auto-casting, and in-place mutation. Given that an output schema exists, the return value doesn't need explanation, making this description contextually complete for typical filtering operations.

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?

The schema provides no parameter descriptions (0% coverage). The description compensates by explaining operators and value casting, and includes concrete examples showing column, operator, and value usage. However, it leaves the df_name parameter unexplained, and the auto-cast behavior is only mentioned for value.

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 filters rows based on a condition, listing supported operators. This distinguishes it from sibling tools like drop_duplicates or drop_missing, which have specific removal logic.

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 explains when to use the tool ('subset data or remove invalid rows') and warns about in-place modification, steering users to copy_dataframe first when preservation is needed. It doesn't explicitly compare to alternative filter/clean tools but provides sufficient usage context.

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/AstyanM/mcp-data-science'

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