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

NameTypeRequiredDescription
urlstringnoThe absolute http(s) URL of the data file (or of a ZIP holding it), e.g. “https://download.medicaid.gov/data/3Q2026LabelerContacts.csv”.
memberstringnoFor 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.
formatstringnoauto (default) decides from the file name, then from the bytes. Set it when a name lies, e.g. a .txt that is tab-separated.
sheetstring,numbernoXLSX only: the worksheet name, or its 1-based position. Default: the first sheet. The response lists every sheet.
header_rownumbernoThe 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.
columnsarraynoColumns to return, in order. Default: all. Not combinable with group_by/aggregates.
itemsstringno
wherearraynoConditions that must all hold. Example: [{“column”:“Legal State”,“op”:“eq”,“value”:“NJ”}]. Empty cells match only “ne”.
itemsobjectnoA column name from the file (case-insensitive if unambiguous).
propertiesstringnoA column name from the file (case-insensitive if unambiguous).
columnstringyesA column name from the file (case-insensitive if unambiguous).
opstringyes
valueunknownyesA string, number or boolean; for op “in” a list of them.
group_bystring,arraynoOne column or a list; the result has one row per distinct combination. Without “aggregates” each row carries a count.
itemsstringno
aggregatesarraynoPer-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).
itemsobjectnoOutput name. Default ”_”, or “count”.
propertiesstringnoOutput name. Default ”_”, or “count”.
fnstringno
columnstringyes
asstringnoOutput name. Default ”_”, or “count”.
order_bystring,arraynoA column (“Amount desc”) or a list of strings / {column, dir: asc|desc}. For a grouped result, the group_by columns and aggregate names.
limitnumbernoRows to return. Default 100, maximum 5000. Describe mode returns 10.
offsetnumbernoResult 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

FieldTypeDescription
modestring
url_requestedstring
url_finalstring
redirectsarray
formatstring
memberstring
sheetstring
sheetsarray
json_pathstring
charsetstring
bytes_readnumber
sha256string
sha256_scopestring
schemaarray
column_countnumber
total_rows_scannednumber
rows_matchednumber
groupsnumber
offsetnumber
limitnumber
returned_rowsnumber
truncatedboolean
next_offsetnumber | null
rowsarray
budgetstring
warningsarray
errorstring
messagestring
columnstring
clausestring
available_columnsarray
did_you_meanarray
cap_bytesnumber
bytes_seennumber
membersarray
member_countnumber
statusnumber
reasonstring
rulestring
retry_after_snumber
budget_scopestring
header_rownumber
header_row_autoboolean
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.

Regenerated from source · build December 1, 2026