<!-- Generated by `just docs` from catalog/toolkits/notion.yaml, catalog/expansions/notion.yaml, catalog/evals/scorecard.json. Edit the source, not this file. -->

# Notion

Notes, wikis, and databases. Search, read, and edit pages and blocks, create and query databases, and manage comments.

| Property | Value |
| --- | --- |
| Slug | `notion` |
| Definition version | `0.1.0` |
| Base URL | `https://api.notion.com` |
| Auth schemes | `oauth2`, `api_key` |
| Action tools | 31 |
| By class | 12 read, 17 write, 2 destructive |
| Triggers | 0 |
| Provider rate limit | not declared, so outbound calls are unpaced |

## Measured routing accuracy

49 golden cases replayed through the router over the whole index: measured over corpus `ea4f12ad2948` (65 toolkits, 2283 tools indexed and 13 declared uncallable), 30 cases written by hand and 19 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.

| Measure | Cases | Share |
| --- | --- | --- |
| top-1 | 19/49 | 38.8% |
| top-8 | 40/49 | 81.6% |

One of the 31 action tools listed above is declared uncallable, so it is indexed nowhere and answers none of these cases. The counts here are scored over the other 30.

The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. `just eval-live` measures the same cases through the live reranker.

## Authentication

Connect an entity with `ConnectionsService.InitiateConnection`, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.

### `oauth2`

| Property | Value |
| --- | --- |
| Authorization URL | `https://api.notion.com/v1/oauth/authorize` |
| Token URL | `https://api.notion.com/v1/oauth/token` |
| Refresh tokens | no, so the end user reauthorizes when the token expires |

### `api_key`

| Property | Value |
| --- | --- |
| Placement | `header` |
| Name | `Authorization` |
| Rendered as | `Bearer {key}` |

Submit the key with `ConnectionsService` rather than putting it in a request; it is sealed at rest and never returned.

## Tools

31 action tools. The catalog-wide slug is `notion.<tool>`, which is what `search_tools` returns and `call_tool` takes.

### `notion.search_pages`

Search the whole workspace for pages by title keyword. Use when the user wants to find a note, doc, or wiki page and doesn't know exactly where it lives. Returns pages only, not database rows or databases themselves; for rows inside one known database use query_database, for finding a database by name use search_databases.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `POST /v1/search`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_size` | integer | no | Results per page, max 100. Defaults to 100. |
| `query` | string | no | Title keywords to search for. Omit to list every page the connection can see. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `has_more` | boolean |  |
| `next_cursor` | string |  |
| `results` | array of object |  |
| `results[].archived` | boolean |  |
| `results[].id` | string |  |
| `results[].last_edited_time` | string (date-time) |  |
| `results[].url` | string |  |

Also retrieved by: "find that note I wrote somewhere", "where's the doc about this", "look up a wiki page by name", "hunt down that page I made", "is there a page on this already".

### `notion.search_databases`

Search the whole workspace for databases (tables) by title keyword. Use when the user wants to find a database, table, or tracker by name but doesn't know its id. Returns the databases themselves, not the rows inside them; for rows use query_database once you have the id, for finding a page use search_pages instead.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `POST /v1/search`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_size` | integer | no | Results per page, max 100. Defaults to 100. |
| `query` | string | no | Title keywords to search for. Omit to list every database the connection can see. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `has_more` | boolean |  |
| `next_cursor` | string |  |
| `results` | array of object |  |
| `results[].archived` | boolean |  |
| `results[].id` | string |  |
| `results[].title` | array of object |  |
| `results[].title[].plain_text` | string |  |
| `results[].url` | string |  |

Also retrieved by: "find the table where we track this", "where's the tracker for that", "look up a database by name", "what boards or trackers do we have", "find that spreadsheet-like thing in the workspace".

### `notion.get_page`

Get one page by id: its properties, parent, url, and archive state. Use when the user names or has already found a specific page. For its content (the text and blocks inside it), use get_page_content.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/pages/{{params.page_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `archived` | boolean |  |
| `created_time` | string (date-time) |  |
| `id` | string |  |
| `last_edited_time` | string (date-time) |  |
| `parent` | object |  |
| `parent.type` | string |  |
| `properties` | object |  |
| `url` | string |  |

Also retrieved by: "pull up that page", "open the doc I mean", "show me that note's details", "grab the page info".

### `notion.get_page_property`

Get the value of a single named property on a page, e.g. one column of a database row. Use when the user asks for one specific field, like a status or due date, rather than the whole page. For everything, use get_page.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/pages/{{params.page_id}}/properties/{{params.property_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id. |
| `property_id` | string | **yes** | Property id or name to read. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `object` | string |  |
| `type` | string |  |

Also retrieved by: "what's the status field say", "check one column on that row", "what's the due date set to", "read a single field off that item".

### `notion.create_page`

Create a new page as a subpage under an existing page. Use for a standalone note, doc, or wiki page, not a row in a table. To add a task, item, or record inside an existing database, use create_database_page instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /v1/pages`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `parent_page_id` | string | **yes** | Id of the page to create the new page under. |
| `title` | string | **yes** | Title of the new page. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `created_time` | string (date-time) |  |
| `id` | string |  |
| `url` | string |  |

Also retrieved by: "start a new note", "make a fresh doc", "I want a new wiki page", "jot down a new page for this", "spin up a subpage under that one".

### `notion.create_database_page`

Add a new row to a database: a task, item, ticket, or record with its column values set. Use when the user wants to log, add, or track something inside an existing table or database. For a standalone page not tied to a database, use create_page instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /v1/pages`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `database_id` | string | **yes** | Id of the database the new row belongs to. |
| `properties` | object | **yes** | Column values for the new row, keyed by property name or id, in Notion's page-property value shape. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `created_time` | string (date-time) |  |
| `id` | string |  |
| `properties` | object |  |
| `url` | string |  |

Also retrieved by: "add a new task to the board", "log this as a row in the tracker", "add an item to the table", "put a new entry in the database", "track this as a new record".

### `notion.update_page_properties`

Update one or more property values on a page or database row, e.g. change a status, owner, or due date. Use when the user wants to edit a row's fields. To rename the page's title only, set_page_title is simpler.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/pages/{{params.page_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id to update. |
| `properties` | object | **yes** | Property values to change, keyed by property name or id. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `last_edited_time` | string (date-time) |  |
| `properties` | object |  |

Also retrieved by: "change the status on that row", "update a field on this item", "move this to a different owner", "edit the due date on the task".

### `notion.set_page_title`

Rename a page or database row by setting its title property only. Use when the user wants to retitle, rename, or fix the name of a page or item without touching any other field. For other fields, use update_page_properties.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/pages/{{params.page_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id to rename. |
| `title` | string | **yes** | New title text. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `last_edited_time` | string (date-time) |  |
| `url` | string |  |

Also retrieved by: "rename that note", "fix the title on this doc", "call this page something else", "retitle the wiki page".

### `notion.archive_page`

Move a whole page to the trash. Use when the user wants to delete, remove, or get rid of an entire page, note, or doc. Recoverable with restore_page. To remove one block inside a page while keeping the rest, use delete_block instead.

Class `destructive` (held by the mutation gate until the call's own arguments carry `"confirm": true`). No scopes beyond the connection's defaults. Calls `PATCH /v1/pages/{{params.page_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id to trash. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `archived` | boolean |  |
| `id` | string |  |

Also retrieved by: "trash this note", "get rid of that doc for good", "delete the whole page", "throw this wiki page away".

### `notion.restore_page`

Bring a trashed page back out of the trash. Use when the user wants to undo a deletion, un-archive, or recover a page they removed earlier.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/pages/{{params.page_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id to restore. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `archived` | boolean |  |
| `id` | string |  |

Also retrieved by: "undo deleting that page", "bring the note back from trash", "I didn't mean to delete that doc", "un-archive that page".

### `notion.get_page_content`

Read the content blocks of a page in order: paragraphs, headings, to-dos, lists, and code. Use when the user wants to see, read, or summarize what's written inside a page. For metadata like title or properties instead of content, use get_page.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/blocks/{{params.page_id}}/children`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id to read the content of. |
| `page_size` | integer | no | Results per page, max 100. Defaults to 100. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `has_more` | boolean |  |
| `next_cursor` | string |  |
| `results` | array of object |  |
| `results[].has_children` | boolean |  |
| `results[].id` | string |  |
| `results[].type` | string |  |

Also retrieved by: "what's actually written in that doc", "read what's inside the page", "show me the notes on this page", "summarize what's in that wiki page".

### `notion.get_block`

Get one content block by id, with its type and content. Use when the user asks about a specific line, section, or element inside a page rather than the whole page.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/blocks/{{params.block_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Notion block id. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `archived` | boolean |  |
| `has_children` | boolean |  |
| `id` | string |  |
| `type` | string |  |

Also retrieved by: "what does that one line say", "check a single block on the page", "what's in this specific section".

### `notion.append_page_content`

Add one or more raw Notion blocks of any type to the end of a page or block. Use for content the add_* convenience tools don't cover, like headings, quotes, images, or several blocks of mixed types at once. For plain text, a single to-do, bullet, or code snippet, the add_text_to_page, add_todo_to_page, add_bulleted_list_to_page, and add_code_block_to_page tools are simpler.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}/children`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Page or block id to append content under. |
| `children` | array of object | **yes** | Raw Notion block objects to append, in Notion's block schema. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].type` | string |  |

Also retrieved by: "dump a bunch of blocks onto the page", "add several pieces of content at once", "drop in a heading and some text together", "build out the page with mixed content".

### `notion.add_text_to_page`

Add one paragraph of plain text to the end of a page. Use when the user wants to jot down a note, write a line, or add a plain text block. For a to-do, bullet, code snippet, or heading, use the matching add_* tool instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}/children`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Page or block id to add the paragraph under. |
| `text` | string | **yes** | Paragraph text to add. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].type` | string |  |

Also retrieved by: "jot a quick note on the page", "write a line at the bottom", "add some plain text to the doc", "drop a sentence into this page".

### `notion.add_todo_to_page`

Add one to-do or checklist item to the end of a page. Use when the user wants a task, action item, or checkbox line added, optionally already checked off. To check or uncheck an existing one, use check_todo or uncheck_todo instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}/children`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Page or block id to add the to-do under. |
| `checked` | boolean | no | True to add it already checked off. Defaults to false. |
| `text` | string | **yes** | To-do item text. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].type` | string |  |

Also retrieved by: "add a task to my checklist", "put a to-do on this page", "add an action item here", "I need a checkbox for this".

### `notion.add_heading_to_page`

Add one section heading to the end of a page. Use when the user wants to break up a doc with a heading or section title. For a plain text line, use add_text_to_page instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}/children`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Page or block id to add the heading under. |
| `text` | string | **yes** | Heading text. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].type` | string |  |

Also retrieved by: "put a section title on the page", "add a heading to break this up", "give this part of the doc a title".

### `notion.add_bulleted_list_to_page`

Add one bulleted list item to the end of a page. Use when the user wants a bullet point added to a page; call it again for each additional bullet. For several list items or mixed content in one call, use append_page_content instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}/children`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Page or block id to add the bullet under. |
| `text` | string | **yes** | Bullet item text. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].type` | string |  |

Also retrieved by: "add a bullet point", "drop a list item on the page", "throw in one more bullet".

### `notion.add_code_block_to_page`

Add one code snippet block to the end of a page, with a language tag for syntax highlighting. Use when the user wants to paste, save, or show a piece of code inside a page.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}/children`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Page or block id to add the code block under. |
| `code` | string | **yes** | Source code text. |
| `language` | string | **yes** | Language tag for highlighting, e.g. "python", "javascript", "plain text". |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].type` | string |  |

Also retrieved by: "paste this snippet into the doc", "save this code on the page", "add a code sample here".

### `notion.update_block`

Replace one content block's own data, e.g. edit a paragraph's text or change a heading. Use when the user wants to edit or fix an existing block in place. To add new content instead, use append_page_content or one of the add_* tools.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block` | object | **yes** | Replacement content keyed by block type, in Notion's block schema, e.g. {"paragraph": {"rich_text": [...]}}. |
| `block_id` | string | **yes** | Notion block id to update. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `last_edited_time` | string (date-time) |  |
| `type` | string |  |

Also retrieved by: "fix the wording in that paragraph", "edit that one section directly", "change what that block says".

### `notion.check_todo`

Mark a to-do or checklist item as done by checking it off. Use when the user says they finished, completed, or checked off a task. To uncheck it again, use uncheck_todo.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | To-do block id to check off. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `to_do` | object |  |
| `to_do.checked` | boolean |  |
| `type` | string |  |

Also retrieved by: "mark that task done", "I finished that one, check it off", "tick off the checklist item", "mark the to-do complete".

### `notion.uncheck_todo`

Mark a to-do or checklist item as not done by unchecking it. Use when the user wants to reopen, undo, or un-complete a task. To check it off, use check_todo.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/blocks/{{params.block_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | To-do block id to uncheck. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `to_do` | object |  |
| `to_do.checked` | boolean |  |
| `type` | string |  |

Also retrieved by: "reopen that task", "I wasn't actually done with that one", "undo checking that off", "mark the to-do as not done yet".

### `notion.delete_block`

Remove a single block from inside a page: one paragraph, heading, to-do, list item, or other content element. Use when the user wants to delete one line or section but keep the rest of the page. To delete the whole page instead, use archive_page.

Class `destructive` (held by the mutation gate until the call's own arguments carry `"confirm": true`). No scopes beyond the connection's defaults. Calls `DELETE /v1/blocks/{{params.block_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Notion block id to remove. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `archived` | boolean |  |
| `id` | string |  |

Also retrieved by: "remove that one line", "get rid of just that section", "delete a single block, keep the rest", "take out that paragraph only".

### `notion.get_database`

Get one database's (table's) details by id: title, columns, and schema. Use when the user names a specific database and wants to know its structure. For the rows inside it, use query_database.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/databases/{{params.database_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `database_id` | string | **yes** | Notion database id. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `archived` | boolean |  |
| `id` | string |  |
| `properties` | object |  |
| `title` | array of object |  |
| `title[].plain_text` | string |  |
| `url` | string |  |

Also retrieved by: "what columns does this table have", "show me the schema for that database", "what fields are in this tracker".

### `notion.query_database`

List and filter the rows inside one already-known database (table), e.g. all tasks with status done or all items assigned to someone. Use when the user names a specific table and wants filtered or sorted entries. To find the database itself by name, use search_databases.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `POST /v1/databases/{{params.database_id}}/query`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `database_id` | string | **yes** | Notion database id to query. |
| `filter` | object | no | Notion filter object to narrow the rows returned. Omit to return all rows. |
| `page_size` | integer | no | Results per page, max 100. Defaults to 100. |
| `sorts` | array of object | no | Notion sort objects, applied in order. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `has_more` | boolean |  |
| `next_cursor` | string |  |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].properties` | object |  |
| `results[].url` | string |  |

Also retrieved by: "show me the tasks marked done", "filter the table for what's assigned to me", "pull rows from that database matching a status", "list the items in this tracker".

### `notion.create_database`

Create a new database (table) under a page, with a title and column schema. Use when the user wants to set up a new tracker, table, or database. To add a row to an existing database, use create_database_page instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /v1/databases`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `parent_page_id` | string | **yes** | Id of the page the new database lives under. |
| `properties` | object | **yes** | Column schema, keyed by column name, in Notion's database property-schema shape. |
| `title` | string | **yes** | Title of the new database. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `url` | string |  |

Also retrieved by: "set up a new tracker", "build a table for this", "make a fresh database", "I need a new board to track things".

### `notion.update_database`

Rename a database or change its column schema: add, remove, or redefine columns. Use when the user wants to restructure a table rather than change a row inside it. For a row's values, use update_page_properties instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PATCH /v1/databases/{{params.database_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `database_id` | string | **yes** | Notion database id to update. |
| `properties` | object | no | Column schema changes, keyed by column name. Omit to leave columns unchanged. |
| `title` | array of object | no | New title as a Notion rich_text array, e.g. [{"type": "text", "text": {"content": "New Title"}}]. Omit to leave the title unchanged. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `last_edited_time` | string (date-time) |  |

Also retrieved by: "add a column to that table", "rename this database", "change the schema on the tracker".

### `notion.list_users`

List every member and bot in the workspace. Use when the user asks who is in the workspace or wants to see all members. For one specific person, use get_user.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/users`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_size` | integer | no | Results per page, max 100. Defaults to 100. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `has_more` | boolean |  |
| `next_cursor` | string |  |
| `results` | array of object |  |
| `results[].id` | string |  |
| `results[].name` | string |  |
| `results[].person` | object |  |
| `results[].person.email` | string |  |
| `results[].type` | string |  |

Also retrieved by: "who's in this workspace", "show everyone with access", "list all the members here".

### `notion.get_user`

Get one workspace member or bot by id: their name, type, and email. Use when the user names a specific person. For the whole member list, use list_users.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/users/{{params.user_id}}`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `user_id` | string | **yes** | Notion user id. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string |  |
| `name` | string |  |
| `person` | object |  |
| `person.email` | string |  |
| `type` | string |  |

Also retrieved by: "who is this person in notion", "look up someone's info here", "find that member's email".

### `notion.get_bot_user`

Get the identity of the connected integration itself: its bot user id and owning workspace. Use to check which account or workspace a connection is authenticated as, not to look up a person.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/users/me`.

Takes no arguments.

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `bot` | object |  |
| `bot.owner` | object |  |
| `bot.owner.type` | string |  |
| `id` | string |  |
| `name` | string |  |

Also retrieved by: "which account is this integration connected as", "check what workspace we're hooked up to", "whose identity is this connection using".

### `notion.create_comment`

Post a comment on a page, starting a new discussion thread. Use when the user wants to comment, leave feedback, or add a note visible to collaborators on a page. To read existing comments first, use list_comments.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /v1/comments`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `page_id` | string | **yes** | Notion page id to comment on. |
| `text` | string | **yes** | Comment text. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `created_time` | string (date-time) |  |
| `id` | string |  |

Also retrieved by: "leave a comment on that page", "reply on this doc with feedback", "drop a note for the team on this page".

### `notion.list_comments`

Read the comments left on a page or block, oldest first. Use when the user wants to see feedback, discussion, or notes other people left. To post a new one, use create_comment.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /v1/comments`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `block_id` | string | **yes** | Page or block id to read comments from. |
| `page_size` | integer | no | Results per page, max 100. Defaults to 100. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `has_more` | boolean |  |
| `next_cursor` | string |  |
| `results` | array of object |  |
| `results[].created_time` | string (date-time) |  |
| `results[].id` | string |  |
| `results[].rich_text` | array of object |  |
| `results[].rich_text[].plain_text` | string |  |

Also retrieved by: "what have people said on this page", "read the feedback left here", "show the discussion on this doc".
