query_pages
Filter, sort, group, and paginate pages within a collection. Returns excerpts.
Last updated
query_pages
Query pages in a collection with structured filters, sorts, grouping, and pagination. Mirrors the view engine the human UI uses.
Query responses return 300-character excerpts, not full bodies — follow
up with read_page for any page the agent
needs in full.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
collection_id | string | yes | The ID of the collection to query. |
filters | object | no | A FilterGroup { combinator: "and"|"or", rules: [...] }. Forwarded verbatim to the query engine. |
sorts | object[] | no | Sort rules: [{ propertyId, direction }]. |
group_by | string | no | propertyId to group results by. |
limit | number | no | Max rows to return. Positive integer, capped at 500. Default 50. |
cursor | string | no | Pagination cursor from a previous response. |
The filters and sorts shapes are defined by the Plainwork query engine;
the MCP server forwards them as-is and surfaces any engine error. A minimal
filter example:
{
"combinator": "and",
"rules": [{ "propertyId": "prop_status", "op": "equals", "value": "open" }]
}
Returns
{
"totalCount": 142,
"nextCursor": "eyJvZmZzZXQiOjUwfQ==",
"notes": [
{
"id": "note_xyz789",
"title": "…",
"excerpt": "First 300 characters of the body…",
"collectionId": "col_a1b2c3",
"folderId": null,
"tags": ["…"],
"updatedAt": "2026-04-10T09:15:00Z",
"propertyValues": { "prop_status": "open" }
}
]
}
nextCursor is present when more pages exist. Pass it back as cursor on
the next call. When absent, the result set is exhausted.
Example
{
"tool": "query_pages",
"arguments": {
"collection_id": "col_a1b2c3",
"filters": {
"combinator": "and",
"rules": [{ "propertyId": "prop_status", "op": "equals", "value": "open" }]
},
"sorts": [{ "propertyId": "prop_updated_at", "direction": "desc" }],
"limit": 20
}
}
See also
search_pagesfor freeform "find X" queriesread_pageto fetch the full body after a querylist_viewsto discover the filters the human UI uses