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.4connection_type: notion5preload: false6metadata:7 source: https://skillmd.com/skills/cloudthinker-ai/managing-notion8---910# Managing Notion1112Tools for Notion workspace management including pages, databases (data sources), blocks, and comments.1314**Important:** All tools require a parameter object. Pass `{}` for tools with no required parameters.1516## Tools (21 total)1718### Users1920| Tool | Description |21|------|-------------|22| `APIGetSelf({})` | Get current bot user |23| `APIGetUser({ user_id })` | Get a user by ID |24| `APIGetUsers({})` | List all users (optional: `start_cursor`, `page_size`) |2526### Search2728| Tool | Description |29|------|-------------|30| `APIPostSearch({})` | Search pages/databases by title (optional: `query`, `filter`, `sort`, `start_cursor`, `page_size`) |3132### Pages3334| Tool | Description |35|------|-------------|36| `APIRetrieveAPage({ page_id })` | Get page metadata (optional: `filter_properties`) |37| `APIPostPage({ parent, properties })` | Create new page (optional: `children`, `icon`, `cover`) |38| `APIPatchPage({ page_id })` | Update page (optional: `properties`, `archived`, `in_trash`, `icon`, `cover`) |39| `APIMovePage({ page_id, parent })` | Move page to new parent |40| `APIRetrieveAPageProperty({ page_id, property_id })` | Get specific property value |4142### Blocks4344| Tool | Description |45|------|-------------|46| `APIRetrieveABlock({ block_id })` | Get block metadata |47| `APIGetBlockChildren({ block_id })` | List child blocks (optional: `start_cursor`, `page_size`) |48| `APIPatchBlockChildren({ block_id, children })` | Append blocks (optional: `after`) |49| `APIUpdateABlock({ block_id })` | Update block (optional: `type`, `archived`) |50| `APIDeleteABlock({ block_id })` | Delete/trash a block |5152### Data Sources (Databases)5354| Tool | Description |55|------|-------------|56| `APIQueryDataSource({ data_source_id })` | Query with filters (optional: `filter`, `sorts`, `start_cursor`, `page_size`) |57| `APIRetrieveADataSource({ data_source_id })` | Get database schema |58| `APICreateADataSource({ parent, properties })` | Create database (optional: `title`) |59| `APIUpdateADataSource({ data_source_id })` | Update schema (optional: `title`, `description`, `properties`) |60| `APIListDataSourceTemplates({ data_source_id })` | List templates in database |6162### Comments6364| Tool | Description |65|------|-------------|66| `APIRetrieveAComment({ block_id })` | Get comments (optional: `start_cursor`, `page_size`) |67| `APICreateAComment({ parent, rich_text })` | Add comment |6869## Examples7071### Search and Retrieve7273```typescript74import { APIPostSearch, APIRetrieveAPage, APIGetBlockChildren } from '@connections/notion';7576// Search (pass empty object if no query)77const results = await APIPostSearch({78 query: 'meeting notes',79 filter: { property: 'object', value: 'page' }80});8182// Get page83const page = await APIRetrieveAPage({ page_id: 'page-id-here' });8485// Get blocks86const blocks = await APIGetBlockChildren({ block_id: page.id });87```8889### Create Page9091```typescript92import { APIPostPage } from '@connections/notion';9394const page = await APIPostPage({95 parent: { page_id: 'parent-page-id' },96 properties: {97 title: [{ text: { content: 'New Page' } }]98 },99 children: [100 {101 object: 'block',102 type: 'paragraph',103 paragraph: { rich_text: [{ text: { content: 'Hello' } }] }104 }105 ]106});107```108109### Query Database110111```typescript112import { APIQueryDataSource } from '@connections/notion';113114const results = await APIQueryDataSource({115 data_source_id: 'database-id',116 filter: {117 property: 'Status',118 status: { equals: 'In Progress' }119 },120 sorts: [{ property: 'Due Date', direction: 'ascending' }]121});122```123124## Property Types125126| Type | Format |127|------|--------|128| Title | `{ title: [{ text: { content: 'value' } }] }` |129| Rich Text | `{ rich_text: [{ text: { content: 'value' } }] }` |130| Number | `{ number: 42 }` |131| Select | `{ select: { name: 'Option' } }` |132| Multi-select | `{ multi_select: [{ name: 'Tag' }] }` |133| Status | `{ status: { name: 'Done' } }` |134| Date | `{ date: { start: '2024-01-01' } }` |135| Checkbox | `{ checkbox: true }` |136137## Block Types138139`paragraph`, `heading_1`, `heading_2`, `heading_3`, `bulleted_list_item`, `numbered_list_item`, `to_do`, `toggle`, `code`, `quote`, `callout`, `divider`, `table`, `image`, `video`, `file`140141## Common Errors142143| Error | Solution |144|-------|----------|145| "object not found" | Verify ID is correct and accessible |146| "validation_error" | Check property names match schema |147| "unauthorized" | Ensure integration has access |148| 422 | Pass `{}` for tools with no required params |149150## Output Format151152Present results as a structured report:153```154Managing Notion Report155══════════════════════156Resources discovered: [count]157158Resource Status Key Metric Issues159──────────────────────────────────────────────160[name] [ok/warn] [value] [findings]161162Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical163Action Items: [list of prioritized findings]164```165166Target ≤50 lines of output. Use tables for multi-resource comparisons.167168## Anti-Hallucination Rules1691701. **NEVER assume resource names** — always discover via CLI/API in Phase 1 before referencing in Phase 2.1712. **NEVER fabricate metric names or dimensions** — verify against the service documentation or `--help` output.1723. **NEVER mix CLI commands between service versions** — confirm which version/API you are targeting.1734. **ALWAYS use the discovery → verify → analyze chain** — every resource referenced must have been discovered first.1745. **ALWAYS handle empty results gracefully** — an empty response is valid data, not an error to retry.175176## Counter-Rationalizations177178| Shortcut | Counter | Why |179|----------|---------|-----|180| "I'll skip discovery and check known resources" | Always run Phase 1 discovery first | Resource names change, new resources appear — assumed names cause errors |181| "The user only asked for a quick check" | Follow the full discovery → analysis flow | Quick checks miss critical issues; structured analysis catches silent failures |182| "Default configuration is probably fine" | Audit configuration explicitly | Defaults often leave logging, security, and optimization features disabled |183| "Metrics aren't needed for this" | Always check relevant metrics when available | API/CLI responses show current state; metrics reveal trends and intermittent issues |184| "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 |185