Skip to main content
Glama

query_database

Retrieve Notion database rows with optional filters, sorting, and limits. Specify a database by alias, URL, ID, or title to get matching entries.

Instructions

Rows of a Notion database, as {title, url, properties}. ref: an alias, a notion.so URL, an id, or an exact database title. filter: property name -> value, combined with AND. Text properties match by substring, everything else by equality. Names must come from get_database_schema. sort: {"property": name, "direction": "asc" | "desc"}. limit: maximum rows to return.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
sortNo
limitNo
filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The description discloses output shape and key query semantics: filters combine with AND, text properties match by substring while others match by equality, and sort expects a specific object shape. This adds meaningful behavioral detail beyond the sparse annotations, though pagination and error behavior are not covered.

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?

The description is compact and well-structured, with the output shape stated first and each parameter described on its own line. There is no filler; every sentence adds operational value.

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 read-only query tool with an output schema, this description covers the core contract: target, parameters, and result shape. It only lacks explicit sibling routing and pagination/error details, which are secondary for a filtered query.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully documents all four parameters with concrete formats: ref alias types, filter object semantics, sort direction enum, and limit meaning. This compensates for the generic additionalProperties schemas and gives an agent enough detail to construct valid arguments.

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?

The description identifies querying rows of a Notion database and specifies the returned shape {title, url, properties}. It distinguishes itself from siblings like list_databases by focusing on row retrieval, though it does not explicitly contrast with related tools like search or get_page.

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?

It gives practical guidance on ref formats and says property names must come from get_database_schema, which is a useful routing hint. However, it does not state when to prefer this tool over alternatives such as search or get_page, nor does it mention when not to use it.

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