On this page

Data tables

query-table-rows

Read rows from a Data Table, with paging, sorting, free-text search and filters. Rows come back keyed by column_id. Needs the fabric:table.read grant.

curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"query-table-rows","arguments":{"table_id":"6ab1944e7566f41b5c28e2eb","page":1,"page_size":3}}}'
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000196\",\"result\":{\"table_id\":\"6ab1944e7566f41b5c28e2eb\",\"page\":1,\"page_size\":3,\"total_count\":2,\"rows\":[{\"_id\":\"6ab1945e7566f41b5c28e301\",\"row_id\":1,\"6ab1944e12917e3705beb0b9\":true,\"6ab1944e56ac670306c8deed\":120,\"6ab1944eb6557622b2632872\":\"Acme\"},{\"_id\":\"6ab1945e7566f41b5c28e302\",\"row_id\":2,\"6ab1944e12917e3705beb0b9\":false,\"6ab1944e56ac670306c8deed\":75,\"6ab1944eb6557622b2632872\":\"Globex\"}]}}"
    }
  ],
  "isError": false
}

Parameters

ParameterTypeRequiredNotes
table_idstringRequiredTable id from list-tables, a 24-character hex id. A table in this project.
pageintegerOptional1-based page number. Default 1. A value below 1 is refused.
page_sizeintegerOptionalRows per page. Default 50.
sort_keystringOptionalColumn to sort by.
sortintegerOptional1 ascending, -1 descending. Any other value is refused.
searchstringOptionalFree-text search across the table.
search_filtersarrayOptionalFilters over the table's columns, each {column, operator, value, type}; a malformed entry is refused. column, operator and value are required. column is a column name or a column_id. operator is one of eq, gt, gte, in, lt, lte, ne, nin; value is an array for in and nin. type is the column type, e.g. string, number or datetime. Default string.
Show full response

A real response, captured from a live call to query-table-rows:

{
  "lifecycle_id": "qlc_000196",
  "result": {
    "page": 1,
    "page_size": 3,
    "rows": [
      {
        "6ab1944e12917e3705beb0b9": true,
        "6ab1944e56ac670306c8deed": 120,
        "6ab1944eb6557622b2632872": "Acme",
        "_id": "6ab1945e7566f41b5c28e301",
        "coworker_user_id": "6a79a770b6c128ccc24bfca7",
        "row_id": 1
      },
      {
        "6ab1944e12917e3705beb0b9": false,
        "6ab1944e56ac670306c8deed": 75,
        "6ab1944eb6557622b2632872": "Globex",
        "_id": "6ab1945e7566f41b5c28e302",
        "coworker_user_id": "6a79a770b6c128ccc24bfca7",
        "row_id": 2
      }
    ],
    "table_id": "6ab1944e7566f41b5c28e2eb",
    "total_count": 2
  }
}
More details

The result has rows, page, page_size, table_id and total_count. Each row's _id is the row_id that update-table-row and delete-table-rows take; the integer row_id field in a row is not.

To run an agent against the next matching row of a table, see Schedules.

Not marked consequential: it is audited lightly and the project's write gate never holds it.

Every tool call works the same way: How every tool call works.