Skip to main content
Glama

notion-mcp__notion_query_data_source

Read-only

Reads the rows of one Notion data source (a table inside a database), with an optional filter, sort order, property allowlist, page size and cursor. Each row is {id, url, created_time, last_edited_time, properties}, with properties as plain values keyed by property name. Filter and sorts are passed to Notion as written, in Notion's query JSON; notion_get_database lists the property names and types they refer to. The result is {results, has_more, next_cursor}, with the same shape when there are no results. has_more true means more results exist than this page holds, and next_cursor is the cursor argument that returns them. With view_id in place of data_source_id, the rows are a saved view's, in its own filter and sort order, and each row is its id alone, which is what Notion's view query returns; notion_get_page reads a row's properties. A view query's results stay cached for 15 minutes; total_count is the number of rows it matched, and incomplete true means Notion's 10,000-row cache cut them short.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "notion-mcp__notion_query_data_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortsNoA list of Notion sort objects, sent unchanged, applied in order. Example: [{"property": "Due", "direction": "ascending"}] or [{"timestamp": "last_edited_time", "direction": "descending"}].
cursorNoThe next_cursor value from an earlier call with the same arguments. Returns the page of results after that one. Absent for the start of the list.
filterNoA Notion filter object, sent unchanged. Example: {"property": "Status", "status": {"equals": "Done"}}; compound filters use {"and": [...]} or {"or": [...]}. Notion's filter reference documents the condition each property type takes. Absent returns every row.
accountNoOptional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used.
view_idNoA database view's id, or a database URL whose ?v= names the view. Takes the place of data_source_id; filter, sorts and properties are not taken with it.
page_sizeNoHow many results one call returns, from 1 to 100. Default 25. A full page comes back with has_more true and a next_cursor for the rest.
propertiesNoProperty names to keep in each row. Absent keeps every property. Names that a row does not have are left out of that row.
data_source_idNoThe data source's Notion id, with or without dashes, or a Notion URL that contains it (the id is read from the URL).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, so the description carries real weight and delivers: exact row shape, the {results, has_more, next_cursor} envelope, that the shape holds when empty, and what has_more/next_cursor mean operationally. It also discloses non-obvious behaviors — the 15-minute view-result cache, total_count, and the 10,000-row cache truncation flagged by incomplete.

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?

Purpose is front-loaded in the first clause, then return shape, pagination, and the view-mode variant follow in a logical order. It is dense and slightly long, with a little overlap between the view_id paragraph and the view_id schema description, but every sentence conveys information an agent needs.

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

Completeness5/5

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

For an 8-parameter, nested-object, no-output-schema tool, the description covers return values, pagination loop mechanics, the two operating modes, and cache/limit caveats. Nothing material is missing for an agent to call it correctly.

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 coverage is 100%, so the baseline is 3; the description still adds value by explaining the data_source_id/view_id substitution as a mode switch and that view mode changes the row shape to an id alone. The view_id constraint about filter/sorts/properties is partly duplicated in the schema text, which keeps it from a 5.

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?

Opens with a specific verb and resource ('Reads the rows of one Notion data source') and immediately disambiguates the resource as 'a table inside a database', which separates it from notion_get_database and notion_get_page. It also names the sibling that supplies the property names needed to build filters.

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?

Gives clear routing: use notion_get_database to learn property names/types before filtering, notion_get_page to read a row's properties, and view_id when the rows should come from a saved view instead of the data source. It doesn't state explicit exclusions (e.g. when to use notion_search instead), so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.