Skip to main content
Glama

Notion MCP Server

by Kazy1014

query_pages

Retrieve Notion database pages with specific filters and sorting. Find tasks by status, projects by due date, or records matching custom conditions using Notion API syntax.

Instructions

Queries and retrieves pages (records) from a Notion database. Supports filtering and sorting. Examples: "tasks with status In Progress", "projects due this week", "tasks assigned to me". Retrieve pages matching specific conditions.

Input Schema

NameRequiredDescriptionDefault
databaseIdYesThe ID of the Notion database to query (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"
filterNoFilter conditions (optional). Follows Notion API filter syntax. Examples: - Status equals "In Progress": { "property": "Status", "select": { "equals": "In Progress" } } - Checkbox is checked: { "property": "Completed", "checkbox": { "equals": true } } - Date is this week: { "property": "Due Date", "date": { "this_week": {} } } - Multiple conditions (AND): { "and": [condition1, condition2] } - Multiple conditions (OR): { "or": [condition1, condition2] }
sortsNoSort conditions (optional). Array of sort specifications. Examples: - Date ascending: [{ "property": "Due Date", "direction": "ascending" }] - Priority descending: [{ "property": "Priority", "direction": "descending" }] - Created time descending: [{ "timestamp": "created_time", "direction": "descending" }]
startCursorNoPagination cursor (optional). Use the nextCursor from a previous query to fetch the next page of results.
pageSizeNoNumber of pages to retrieve at once (optional, default: 100, max: 100). Use with pagination for large datasets.

Input Schema (JSON Schema)

{ "properties": { "databaseId": { "description": "The ID of the Notion database to query (32 or 36 character UUID format). Example: \"123e4567-e89b-12d3-a456-426614174000\"", "type": "string" }, "filter": { "description": "Filter conditions (optional). Follows Notion API filter syntax.\n\nExamples:\n- Status equals \"In Progress\": { \"property\": \"Status\", \"select\": { \"equals\": \"In Progress\" } }\n- Checkbox is checked: { \"property\": \"Completed\", \"checkbox\": { \"equals\": true } }\n- Date is this week: { \"property\": \"Due Date\", \"date\": { \"this_week\": {} } }\n- Multiple conditions (AND): { \"and\": [condition1, condition2] }\n- Multiple conditions (OR): { \"or\": [condition1, condition2] }", "type": "object" }, "pageSize": { "description": "Number of pages to retrieve at once (optional, default: 100, max: 100). Use with pagination for large datasets.", "type": "number" }, "sorts": { "description": "Sort conditions (optional). Array of sort specifications.\n\nExamples:\n- Date ascending: [{ \"property\": \"Due Date\", \"direction\": \"ascending\" }]\n- Priority descending: [{ \"property\": \"Priority\", \"direction\": \"descending\" }]\n- Created time descending: [{ \"timestamp\": \"created_time\", \"direction\": \"descending\" }]", "type": "array" }, "startCursor": { "description": "Pagination cursor (optional). Use the nextCursor from a previous query to fetch the next page of results.", "type": "string" } }, "required": [ "databaseId" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kazy1014/notion-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server