# database-query

Query a Notion database by name or ID and return structured, readable results with optional filters and sorting.

Skill by Notion. Category: Data and backend.

## Install

Project (for this project only):

```sh
npx skills add makenotion/cursor-notion-plugin --skill database-query
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add makenotion/cursor-notion-plugin --skill database-query -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Warn
- Runlayer: Pass
- ZeroLeaks: Pass

Installs: 57. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/makenotion/cursor-notion-plugin/database-query)

## Source

[Open the source](https://github.com/makenotion/cursor-notion-plugin/tree/HEAD/skills/database-query). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: database-query
description: Query a Notion database by name or ID and return structured, readable results with optional filters and sorting.
---

# Query Notion Database

Use the Notion MCP server to query a database on the user's behalf.

## Workflow

1. Interpret the request to extract:
   - Target database (by name or ID)
   - Optional filter(s) or sort(s) the user describes.
2. If multiple databases match the name, ask the user to choose the correct one.
3. Perform a query that:
   - Applies the requested filters (e.g. status = Active, owner = Alice, due date this week).
   - Limits to a reasonable number of rows (e.g. 20-50) unless the user explicitly asks for more.
4. Present the results in a compact table-like format with:
   - Key properties (e.g. Name, Status, Owner, Due).
   - A short summary if the database has rich text content.
5. If no rows match, say so clearly and suggest alternative filters.

## Important

Avoid dumping raw JSON. Focus on readability and decision-making value for the user.
````

- Previous: [wix-headless-kit](https://syn4pse.dev/terminal/wix-headless-kit.md)
- Next: [search](https://syn4pse.dev/terminal/cursor-notion-plugin-search.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
