query_database
Search and filter Notion databases using text queries or structured filters to find specific information based on criteria like status, dates, or keywords.
Instructions
Query a database with optional filters, sorts, or text search. Use text for simple keyword search across all text fields. For advanced filtering, use the filter parameter with Notion filter syntax:
Text contains: { "property": "Name", "title": { "contains": "keyword" } }
Select equals: { "property": "Status", "status": { "equals": "Done" } }
Checkbox: { "property": "Urgent", "checkbox": { "equals": true } }
Date after: { "property": "Due", "date": { "after": "2025-01-01" } }
Combine: { "and": [...] } or { "or": [...] } Call get_database first to see available properties and valid options.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes | Database ID | |
| filter | No | Optional Notion filter object | |
| sorts | No | Optional Notion sorts array | |
| text | No | Search text — matches across all text fields (title, rich_text, url, email, phone) |