Managing Notion
Tools for Notion workspace management including pages, databases (data sources), blocks, and comments.
Important: All tools require a parameter object. Pass {} for tools with no required parameters.
Tools (21 total)
Users
| Tool |
Description |
APIGetSelf({}) |
Get current bot user |
APIGetUser({ user_id }) |
Get a user by ID |
APIGetUsers({}) |
List all users (optional: start_cursor, page_size) |
Search
| Tool |
Description |
APIPostSearch({}) |
Search pages/databases by title (optional: query, filter, sort, start_cursor, page_size) |
Pages
| Tool |
Description |
APIRetrieveAPage({ page_id }) |
Get page metadata (optional: filter_properties) |
APIPostPage({ parent, properties }) |
Create new page (optional: children, icon, cover) |
APIPatchPage({ page_id }) |
Update page (optional: properties, archived, in_trash, icon, cover) |
APIMovePage({ page_id, parent }) |
Move page to new parent |
APIRetrieveAPageProperty({ page_id, property_id }) |
Get specific property value |
Blocks
| Tool |
Description |
APIRetrieveABlock({ block_id }) |
Get block metadata |
APIGetBlockChildren({ block_id }) |
List child blocks (optional: start_cursor, page_size) |
APIPatchBlockChildren({ block_id, children }) |
Append blocks (optional: after) |
APIUpdateABlock({ block_id }) |
Update block (optional: type, archived) |
APIDeleteABlock({ block_id }) |
Delete/trash a block |
Data Sources (Databases)
| Tool |
Description |
APIQueryDataSource({ data_source_id }) |
Query with filters (optional: filter, sorts, start_cursor, page_size) |
APIRetrieveADataSource({ data_source_id }) |
Get database schema |
APICreateADataSource({ parent, properties }) |
Create database (optional: title) |
APIUpdateADataSource({ data_source_id }) |
Update schema (optional: title, description, properties) |
APIListDataSourceTemplates({ data_source_id }) |
List templates in database |
Comments
| Tool |
Description |
APIRetrieveAComment({ block_id }) |
Get comments (optional: start_cursor, page_size) |
APICreateAComment({ parent, rich_text }) |
Add comment |
Examples
Search and Retrieve
import { APIPostSearch, APIRetrieveAPage, APIGetBlockChildren } from '@connections/notion';
// Search (pass empty object if no query)
const results = await APIPostSearch({
query: 'meeting notes',
filter: { property: 'object', value: 'page' }
});
// Get page
const page = await APIRetrieveAPage({ page_id: 'page-id-here' });
// Get blocks
const blocks = await APIGetBlockChildren({ block_id: page.id });
Create Page
import { APIPostPage } from '@connections/notion';
const page = await APIPostPage({
parent: { page_id: 'parent-page-id' },
properties: {
title: [{ text: { content: 'New Page' } }]
},
children: [
{
object: 'block',
type: 'paragraph',
paragraph: { rich_text: [{ text: { content: 'Hello' } }] }
}
]
});
Query Database
import { APIQueryDataSource } from '@connections/notion';
const results = await APIQueryDataSource({
data_source_id: 'database-id',
filter: {
property: 'Status',
status: { equals: 'In Progress' }
},
sorts: [{ property: 'Due Date', direction: 'ascending' }]
});
Property Types
| Type |
Format |
| Title |
{ title: [{ text: { content: 'value' } }] } |
| Rich Text |
{ rich_text: [{ text: { content: 'value' } }] } |
| Number |
{ number: 42 } |
| Select |
{ select: { name: 'Option' } } |
| Multi-select |
{ multi_select: [{ name: 'Tag' }] } |
| Status |
{ status: { name: 'Done' } } |
| Date |
{ date: { start: '2024-01-01' } } |
| Checkbox |
{ checkbox: true } |
Block Types
paragraph, heading_1, heading_2, heading_3, bulleted_list_item, numbered_list_item, to_do, toggle, code, quote, callout, divider, table, image, video, file
Common Errors
| Error |
Solution |
| "object not found" |
Verify ID is correct and accessible |
| "validation_error" |
Check property names match schema |
| "unauthorized" |
Ensure integration has access |
| 422 |
Pass {} for tools with no required params |
Output Format
Present results as a structured report:
Managing Notion Report
══════════════════════
Resources discovered: [count]
Resource Status Key Metric Issues
──────────────────────────────────────────────
[name] [ok/warn] [value] [findings]
Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical
Action Items: [list of prioritized findings]
Target ≤50 lines of output. Use tables for multi-resource comparisons.
Anti-Hallucination Rules
- NEVER assume resource names — always discover via CLI/API in Phase 1 before referencing in Phase 2.
- NEVER fabricate metric names or dimensions — verify against the service documentation or
--help output.
- NEVER mix CLI commands between service versions — confirm which version/API you are targeting.
- ALWAYS use the discovery → verify → analyze chain — every resource referenced must have been discovered first.
- ALWAYS handle empty results gracefully — an empty response is valid data, not an error to retry.
Counter-Rationalizations
| Shortcut |
Counter |
Why |
| "I'll skip discovery and check known resources" |
Always run Phase 1 discovery first |
Resource names change, new resources appear — assumed names cause errors |
| "The user only asked for a quick check" |
Follow the full discovery → analysis flow |
Quick checks miss critical issues; structured analysis catches silent failures |
| "Default configuration is probably fine" |
Audit configuration explicitly |
Defaults often leave logging, security, and optimization features disabled |
| "Metrics aren't needed for this" |
Always check relevant metrics when available |
API/CLI responses show current state; metrics reveal trends and intermittent issues |
| "I don't have access to that" |
Try the command and report the actual error |
Assumed permission failures prevent useful investigation; actual errors are informative |
1---2name: managing-notion3description: Notion workspace management - pages, databases, blocks, and content. Use when searching, creating, updating, or organizing Notion content.4---56# Managing Notion78Tools for Notion workspace management including pages, databases (data sources), blocks, and comments.910**Important:** All tools require a parameter object. Pass `{}` for tools with no required parameters.1112## Tools (21 total)1314### Users1516| Tool | Description |17|------|-------------|18| `APIGetSelf({})` | Get current bot user |19| `APIGetUser({ user_id })` | Get a user by ID |20| `APIGetUsers({})` | List all users (optional: `start_cursor`, `page_size`) |2122### Search2324| Tool | Description |25|------|-------------|26| `APIPostSearch({})` | Search pages/databases by title (optional: `query`, `filter`, `sort`, `start_cursor`, `page_size`) |2728### Pages2930| Tool | Description |31|------|-------------|32| `APIRetrieveAPage({ page_id })` | Get page metadata (optional: `filter_properties`) |33| `APIPostPage({ parent, properties })` | Create new page (optional: `children`, `icon`, `cover`) |34| `APIPatchPage({ page_id })` | Update page (optional: `properties`, `archived`, `in_trash`, `icon`, `cover`) |35| `APIMovePage({ page_id, parent })` | Move page to new parent |36| `APIRetrieveAPageProperty({ page_id, property_id })` | Get specific property value |3738### Blocks3940| Tool | Description |41|------|-------------|42| `APIRetrieveABlock({ block_id })` | Get block metadata |43| `APIGetBlockChildren({ block_id })` | List child blocks (optional: `start_cursor`, `page_size`) |44| `APIPatchBlockChildren({ block_id, children })` | Append blocks (optional: `after`) |45| `APIUpdateABlock({ block_id })` | Update block (optional: `type`, `archived`) |46| `APIDeleteABlock({ block_id })` | Delete/trash a block |4748### Data Sources (Databases)4950| Tool | Description |51|------|-------------|52| `APIQueryDataSource({ data_source_id })` | Query with filters (optional: `filter`, `sorts`, `start_cursor`, `page_size`) |53| `APIRetrieveADataSource({ data_source_id })` | Get database schema |54| `APICreateADataSource({ parent, properties })` | Create database (optional: `title`) |55| `APIUpdateADataSource({ data_source_id })` | Update schema (optional: `title`, `description`, `properties`) |56| `APIListDataSourceTemplates({ data_source_id })` | List templates in database |5758### Comments5960| Tool | Description |61|------|-------------|62| `APIRetrieveAComment({ block_id })` | Get comments (optional: `start_cursor`, `page_size`) |63| `APICreateAComment({ parent, rich_text })` | Add comment |6465## Examples6667### Search and Retrieve6869```typescript70import { APIPostSearch, APIRetrieveAPage, APIGetBlockChildren } from '@connections/notion';7172// Search (pass empty object if no query)73const results = await APIPostSearch({74 query: 'meeting notes',75 filter: { property: 'object', value: 'page' }76});7778// Get page79const page = await APIRetrieveAPage({ page_id: 'page-id-here' });8081// Get blocks82const blocks = await APIGetBlockChildren({ block_id: page.id });83```8485### Create Page8687```typescript88import { APIPostPage } from '@connections/notion';8990const page = await APIPostPage({91 parent: { page_id: 'parent-page-id' },92 properties: {93 title: [{ text: { content: 'New Page' } }]94 },95 children: [96 {97 object: 'block',98 type: 'paragraph',99 paragraph: { rich_text: [{ text: { content: 'Hello' } }] }100 }101 ]102});103```104105### Query Database106107```typescript108import { APIQueryDataSource } from '@connections/notion';109110const results = await APIQueryDataSource({111 data_source_id: 'database-id',112 filter: {113 property: 'Status',114 status: { equals: 'In Progress' }115 },116 sorts: [{ property: 'Due Date', direction: 'ascending' }]117});118```119120## Property Types121122| Type | Format |123|------|--------|124| Title | `{ title: [{ text: { content: 'value' } }] }` |125| Rich Text | `{ rich_text: [{ text: { content: 'value' } }] }` |126| Number | `{ number: 42 }` |127| Select | `{ select: { name: 'Option' } }` |128| Multi-select | `{ multi_select: [{ name: 'Tag' }] }` |129| Status | `{ status: { name: 'Done' } }` |130| Date | `{ date: { start: '2024-01-01' } }` |131| Checkbox | `{ checkbox: true }` |132133## Block Types134135`paragraph`, `heading_1`, `heading_2`, `heading_3`, `bulleted_list_item`, `numbered_list_item`, `to_do`, `toggle`, `code`, `quote`, `callout`, `divider`, `table`, `image`, `video`, `file`136137## Common Errors138139| Error | Solution |140|-------|----------|141| "object not found" | Verify ID is correct and accessible |142| "validation_error" | Check property names match schema |143| "unauthorized" | Ensure integration has access |144| 422 | Pass `{}` for tools with no required params |145146## Output Format147148Present results as a structured report:149```150Managing Notion Report151══════════════════════152Resources discovered: [count]153154Resource Status Key Metric Issues155──────────────────────────────────────────────156[name] [ok/warn] [value] [findings]157158Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical159Action Items: [list of prioritized findings]160```161162Target ≤50 lines of output. Use tables for multi-resource comparisons.163164## Anti-Hallucination Rules1651661. **NEVER assume resource names** — always discover via CLI/API in Phase 1 before referencing in Phase 2.1672. **NEVER fabricate metric names or dimensions** — verify against the service documentation or `--help` output.1683. **NEVER mix CLI commands between service versions** — confirm which version/API you are targeting.1694. **ALWAYS use the discovery → verify → analyze chain** — every resource referenced must have been discovered first.1705. **ALWAYS handle empty results gracefully** — an empty response is valid data, not an error to retry.171172## Counter-Rationalizations173174| Shortcut | Counter | Why |175|----------|---------|-----|176| "I'll skip discovery and check known resources" | Always run Phase 1 discovery first | Resource names change, new resources appear — assumed names cause errors |177| "The user only asked for a quick check" | Follow the full discovery → analysis flow | Quick checks miss critical issues; structured analysis catches silent failures |178| "Default configuration is probably fine" | Audit configuration explicitly | Defaults often leave logging, security, and optimization features disabled |179| "Metrics aren't needed for this" | Always check relevant metrics when available | API/CLI responses show current state; metrics reveal trends and intermittent issues |180| "I don't have access to that" | Try the command and report the actual error | Assumed permission failures prevent useful investigation; actual errors are informative |181