Skip to main content
Glama
bobmatnyc
by bobmatnyc

query_database

Retrieve pages from a Notion database using filters, sorting, and pagination. Get only the data you need with precise query criteria.

Instructions

Query a Notion database to retrieve pages matching filter criteria. Supports filtering, sorting, and pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortsNoList of sort objects. E.g., [{"property": "Name", "direction": "ascending"}]
filterNoNotion filter object. E.g., {"property": "Status", "select": {"equals": "Done"}}
page_sizeNoMaximum results to return (1-100)
database_idYesDatabase UUID to query
start_cursorNoPagination cursor from a previous response
Behavior2/5

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

With no annotations provided, the description must fully disclose behavior; it only lists supported features (filtering, sorting, pagination) without explaining pagination cursor handling, result size limits, or read-only semantics. It adds little beyond what the schema already reveals.

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?

A single sentence that communicates the core function efficiently with no filler. It is appropriately sized.

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

Completeness2/5

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

The tool has no output schema, so the description must explain return values and pagination behavior. It only says 'retrieve pages' without describing the response structure, next_cursor, or how page_size interacts. This is insufficient for a tool with nested objects and 5 parameters.

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

Parameters3/5

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

The schema has 100% coverage with examples for filter and sorts. The description merely restates these features ('Supports filtering, sorting, and pagination') and provides no additional semantic context for the parameters.

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?

The description precisely states 'Query a Notion database to retrieve pages matching filter criteria,' identifying the verb (query), resource (Notion database), and outcome (retrieve pages). This distinguishes it from sibling tools like get_page (single page) and search (workspace-wide search).

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 the use case of retrieving filtered pages from a specific database but does not explicitly mention when to choose it over alternatives like search or get_database. No prerequisites or exclusions are stated.

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/bobmatnyc/notion-mpm'

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