Skip to main content
Glama

query_database

Query a Notion database with optional filters, sorts, or text search. Use text for keyword search, or advanced Notion filter syntax for precise queries.

Instructions

Query a database with optional filters, sorts, or text search. Use text for simple keyword search across title, rich_text, url, email, and phone fields. For advanced filters, pass Notion filter syntax and call get_database first to see property names and valid options.

Response shape: { results: Array, warnings?: Array }. Multi-value properties are capped by max_property_items and can emit truncated_properties; read resources easy-notion://docs/property-pagination and easy-notion://docs/warnings for details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_idYesDatabase ID
filterNoOptional Notion filter object
sortsNoOptional Notion sorts array
textNoSearch text — matches across all text fields (title, rich_text, url, email, phone)
max_property_itemsNoMax items returned per multi-value property (title, rich_text, relation, people). Default 75. Set to 0 for unlimited. Negative values rejected. When the cap is hit, the response includes a truncated_properties warning with a how_to_fetch_all hint.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes response shape and truncation behavior for multi-value properties. References external docs for details. No annotations provided, so description carries behavioral burden adequately.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences plus response shape line, no fluff. Front-loaded with main purpose. Efficient and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers query behavior, parameter options, truncation, and warnings. References documentation for deeper dives. Lacks pagination info for result list itself, but overall sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage, baseline 3. Description adds value by specifying which fields text searches across and explaining max_property_items behavior (capping and warnings).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Query a database' with optional filters, sorts, or text search. Distinguishes from sibling tools like 'search' (global) and 'query_view' (view-specific).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides guidance on using text for simple search vs advanced filters with Notion syntax, and recommends calling get_database first. Does not explicitly list when not to use, but context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/Grey-Iris/easy-notion-mcp'

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