query_table
Pack: web-fetch · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/query_table for the schema, then POST the same URL with its arguments for the data.
Filter, select, sort, group and aggregate the rows of a CSV, TSV, XLSX, JSON or JSONL file at a public URL (or one file inside a ZIP) and return only the matching rows, so you stop paging raw bytes with fetch_url.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | no | The absolute http(s) URL of the data file (or of a ZIP holding it), e.g. “https://download.medicaid.gov/data/3Q2026LabelerContacts.csv”. |
member | string | no | For a ZIP: the exact (or case-insensitive) name of the table file inside it. Omit for a plain file; a ZIP called without it is refused with the list of its files. |
format | string | no | auto (default) decides from the file name, then from the bytes. Set it when a name lies, e.g. a .txt that is tab-separated. |
sheet | string,number | no | XLSX only: the worksheet name, or its 1-based position. Default: the first sheet. The response lists every sheet. |
header_row | number | no | The 1-based row (counting non-empty rows) that holds the column names, for a file or sheet that opens with title lines. Default 1; an XLSX sheet whose row 1 is a lone title cell is read from row 2 and says so. |
columns | array | no | Columns to return, in order. Default: all. Not combinable with group_by/aggregates. |
items | string | no | |
where | array | no | Conditions that must all hold. Example: [{“column”:“Legal State”,“op”:“eq”,“value”:“NJ”}]. Empty cells match only “ne”. |
items | object | no | A column name from the file (case-insensitive if unambiguous). |
properties | string | no | A column name from the file (case-insensitive if unambiguous). |
column | string | yes | A column name from the file (case-insensitive if unambiguous). |
op | string | yes | |
value | unknown | yes | A string, number or boolean; for op “in” a list of them. |
group_by | string,array | no | One column or a list; the result has one row per distinct combination. Without “aggregates” each row carries a count. |
items | string | no | |
aggregates | array | no | Per-group (or whole-file, without group_by) calculations. count with no column counts rows; the other functions need a column and ignore non-numeric cells (reported in warnings). |
items | object | no | Output name. Default ” |
properties | string | no | Output name. Default ” |
fn | string | no | |
column | string | yes | |
as | string | no | Output name. Default ” |
order_by | string,array | no | A column (“Amount desc”) or a list of strings / {column, dir: asc|desc}. For a grouped result, the group_by columns and aggregate names. |
limit | number | no | Rows to return. Default 100, maximum 5000. Describe mode returns 10. |
offset | number | no | Result rows to skip (maximum 100000). Use next_offset from the previous call to page. |
Example call
Arguments
{
"url": "https://download.medicaid.gov/data/3Q2026LabelerContacts.csv"
}
curl
curl -X POST https://gateway.pipeworx.io/web-fetch/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_table","arguments":{"url":"https://download.medicaid.gov/data/3Q2026LabelerContacts.csv"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('query_table', {
"url": "https://download.medicaid.gov/data/3Q2026LabelerContacts.csv"
});
More examples
{
"url": "https://download.medicaid.gov/data/3Q2026LabelerContacts.csv",
"where": [
{
"column": "Legal State",
"op": "eq",
"value": "NJ"
}
],
"columns": [
"Labeler Code",
"Labeler Name",
"Legal City"
],
"limit": 5
}
{
"url": "https://download.medicaid.gov/data/3Q2026LabelerContacts.csv",
"group_by": "Legal State",
"aggregates": [
{
"fn": "count"
}
],
"order_by": "count desc",
"limit": 5
}
Response shape
| Field | Type | Description |
|---|---|---|
mode | string | |
url_requested | string | |
url_final | string | |
redirects | array | |
format | string | |
member | string | |
sheet | string | |
sheets | array | |
json_path | string | |
charset | string | |
bytes_read | number | |
sha256 | string | |
sha256_scope | string | |
schema | array | |
column_count | number | |
total_rows_scanned | number | |
rows_matched | number | |
groups | number | |
offset | number | |
limit | number | |
returned_rows | number | |
truncated | boolean | |
next_offset | number | null | |
rows | array | |
budget | string | |
warnings | array | |
error | string | |
message | string | |
column | string | |
clause | string | |
available_columns | array | |
did_you_mean | array | |
cap_bytes | number | |
bytes_seen | number | |
members | array | |
member_count | number | |
status | number | |
reason | string | |
rule | string | |
retry_after_s | number | |
budget_scope | string | |
header_row | number | |
header_row_auto | boolean |
Full JSON Schema
{
"type": "object",
"properties": {
"mode": {
"type": "string"
},
"url_requested": {
"type": "string"
},
"url_final": {
"type": "string"
},
"redirects": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"format": {
"type": "string"
},
"member": {
"type": "string"
},
"sheet": {
"type": "string"
},
"sheets": {
"type": "array",
"items": {
"type": "string"
}
},
"json_path": {
"type": "string"
},
"charset": {
"type": "string"
},
"bytes_read": {
"type": "number"
},
"sha256": {
"type": "string"
},
"sha256_scope": {
"type": "string"
},
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"non_null": {
"type": "number"
}
},
"additionalProperties": true
}
},
"column_count": {
"type": "number"
},
"total_rows_scanned": {
"type": "number"
},
"rows_matched": {
"type": "number"
},
"groups": {
"type": "number"
},
"offset": {
"type": "number"
},
"limit": {
"type": "number"
},
"returned_rows": {
"type": "number"
},
"truncated": {
"type": "boolean"
},
"next_offset": {
"type": [
"number",
"null"
]
},
"rows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"budget": {
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"error": {
"type": "string"
},
"message": {
"type": "string"
},
"column": {
"type": "string"
},
"clause": {
"type": "string"
},
"available_columns": {
"type": "array",
"items": {
"type": "string"
}
},
"did_you_mean": {
"type": "array",
"items": {
"type": "string"
}
},
"cap_bytes": {
"type": "number"
},
"bytes_seen": {
"type": "number"
},
"members": {
"type": "array",
"items": {
"type": "string"
}
},
"member_count": {
"type": "number"
},
"status": {
"type": "number"
},
"reason": {
"type": "string"
},
"rule": {
"type": "string"
},
"retry_after_s": {
"type": "number"
},
"budget_scope": {
"type": "string"
},
"header_row": {
"type": "number"
},
"header_row_auto": {
"type": "boolean"
}
},
"additionalProperties": true
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the web-fetch pack
{
"mcpServers": {
"web-fetch": {
"url": "https://gateway.pipeworx.io/web-fetch/mcp"
}
}
}
See Getting Started for client-specific install steps.