Skip to main content
Glama
davidlinjiahao

notion-enhanced

query_database

Retrieve rows from a Notion database with optional filters and sorts, and auto-paginate to fetch all matching results.

Instructions

Query a Notion database with optional filter and sorts.

Args: database_id: The ID of the Notion database filter: Optional Notion filter object (see Notion API docs) sorts: Optional list of sort objects page_size: Number of results per page (max 100) start_cursor: Cursor for pagination (from previous query's next_cursor) fetch_all: If True, auto-paginate to fetch ALL results. If False, return single page with pagination info. Default True.

Returns: Dict with: - results: List of database rows with parsed properties - total_count: Number of results returned - has_more: Whether more results exist (only when fetch_all=False) - next_cursor: Cursor for next page (only when fetch_all=False and has_more=True)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortsNo
filterNo
fetch_allNo
page_sizeNo
database_idYes
start_cursorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully explains pagination semantics and the return shape, including fetch_all behavior, but it omits permissions, read-only nature, rate limits, and error behavior.

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

Conciseness4/5

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

Front-loaded with a clear purpose, then structured Args and Returns sections. The Returns section may be partially redundant because an output schema exists, but the parameter explanations are necessary given the schema's lack of descriptions.

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?

For a six-parameter query tool with no annotations and an output schema, the description covers parameter meaning, pagination behavior, and return fields well enough to call it correctly. It is less complete on when to choose it over sibling tools and on operational constraints like permissions.

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 description coverage is 0%, so the description must compensate, and it does for all six parameters: database_id, filter, sorts, page_size max, start_cursor source, and fetch_all default/pagination effect. The filter and sorts descriptions defer to external Notion API docs rather than fully defining their structure.

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

Purpose4/5

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

States a specific verb and resource ('Query a Notion database') plus the main optional refinements ('filter and sorts'). It is clearly a database-query tool, but it does not explicitly distinguish itself from siblings like search_pages or get_database_schema.

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

Usage Guidelines3/5

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

The description implies usage through its arguments (filter, sorts, pagination), but it never states when to use this tool versus alternatives or any prerequisites/exclusions. Guidance is only implicit.

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