query_database
Retrieve rows from a Notion database with filters, sorts, and page size; narrow filters when results exceed the 500-row return limit.
Instructions
Query a Notion database with optional filters and sorts.
Args: database_id: The database to query. filter_json: JSON string for a Notion filter object. Leave empty for no filter. sorts_json: JSON string for a Notion sorts array. Leave empty for no sorting. page_size: Maximum rows per page fetch (max 100).
Returns at most 500 rows. truncated is true when more rows matched;
narrow the filter to see the rest.
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": {
"database_id": "<database_id>"
},
"name": "query_database"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_size | No | ||
| sorts_json | No | ||
| database_id | Yes | ||
| filter_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |