Skip to main content
Glama
Internamaro Apify Data MCP

Internamaro Apify Data MCP

Filter Rows

filter_rows
Read-only

Filter rows from a CSV, TSV, JSON, or NDJSON file or Apify dataset using conditions like 'country = US' or 'price > 100', and return every matching row with its original columns.

Instructions

Returns every row that matches the conditions, with all its original columns. Filters rows of a CSV, TSV, JSON or NDJSON file (by public URL) or an Apify dataset with simple conditions such as 'country = US' or 'price > 100'. Give at least one of: fileUrl or datasetId. Runs the Apify Actor ucchiii/filter-rows on YOUR Apify account (APIFY_TOKEN); you pay that Actor's pay-per-event price, see https://apify.com/ucchiii/filter-rows.

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": {
      "conditions": "<conditions>"
    },
    "name": "filter_rows"
  }
}

Input Schema

NameRequiredDescriptionDefault
matchNoDefault: all conditions must match.all
fileUrlNoPublic http(s) link to the file to filter (up to 500 MB; JSON arrays up to 150 MB, NDJSON has no extra limit). Use this OR an Apify dataset.
encodingNoDefault auto: UTF-8, then Shift_JIS if kana are found, then Windows-1252.auto
datasetIdNoDataset to filter, for example the defaultDatasetId of a scraper run. You can paste a dataset URL from Apify Console too.
delimiterNoDefault auto: guessed from the header line.auto
conditionsYesOne condition per line: column, operator, value. Operators: = != > >= < <= contains, not contains, starts with, ends with, in (comma list), not in, is empty, is not empty. Text is compared without case; numbers as numbers; ISO dates (2025-06-01) work with > and <. Nested fields: address.city. Put a column name with an operator inside it in quotes.
inputFormatNoDefault auto: from the file extension, content type and content. Ignored for datasets.auto
maxOutputRowsNoOptional. Empty = keep every matching row. Rows read until then are charged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover readOnlyHint and openWorldHint; the description adds substantial context beyond them: the job runs on the caller's own Apify account, requires APIFY_TOKEN, is billed pay-per-event at the Actor's price (with a link), and rows are charged up to maxOutputRows. These cost and auth disclosures are exactly the behavioral traits an agent needs before invoking.

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?

Three sentences, front-loaded with the return value, then input sources, then cost/auth. Every sentence carries distinct information with no repetition of schema or annotation content.

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?

For an 8-parameter, no-output-schema tool, the description covers inputs, return shape, cost model, and authentication. Nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds a cross-parameter constraint not expressed in the schema: at least one of fileUrl or datasetId must be supplied even though neither is individually required. Example condition syntax ('country = US', 'price > 100') also helps, though the full operator list lives in 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?

States a specific verb and resource: filters rows of a CSV/TSV/JSON/NDJSON file or Apify dataset by conditions, and it also declares the return shape ("every row that matches... with all its original columns"). It is precise enough to distinguish from utility siblings like remove_duplicates or flatten_json, though it never names an alternative explicitly.

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?

Gives a concrete input prerequisite ("Give at least one of: fileUrl or datasetId") and explains the two input modes and example conditions. It stops short of stating when a different tool should be used instead, so there are no exclusions, but the usage context is clear.

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