atmon docs

REFERENCE/TOOLKITS/NOTION.MD

Notion

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

PropertyValue
Slugnotion
Definition version0.1.0
Base URLhttps://api.notion.com
Auth schemesoauth2, api_key
Action tools31
By class12 read, 17 write, 2 destructive
Triggers0
Provider rate limitnot 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.

MeasureCasesShare
top-119/4938.8%
top-840/4981.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

PropertyValue
Authorization URLhttps://api.notion.com/v1/oauth/authorize
Token URLhttps://api.notion.com/v1/oauth/token
Refresh tokensno, so the end user reauthorizes when the token expires

api_key

PropertyValue
Placementheader
NameAuthorization
Rendered asBearer {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:

ArgumentTypeRequiredNotes
page_sizeintegernoResults per page, max 100. Defaults to 100.
querystringnoTitle 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):

FieldTypeNotes
has_moreboolean
next_cursorstring
resultsarray of object
results[].archivedboolean
results[].idstring
results[].last_edited_timestring (date-time)
results[].urlstring

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:

ArgumentTypeRequiredNotes
page_sizeintegernoResults per page, max 100. Defaults to 100.
querystringnoTitle 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):

FieldTypeNotes
has_moreboolean
next_cursorstring
resultsarray of object
results[].archivedboolean
results[].idstring
results[].titlearray of object
results[].title[].plain_textstring
results[].urlstring

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id.

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

FieldTypeNotes
archivedboolean
created_timestring (date-time)
idstring
last_edited_timestring (date-time)
parentobject
parent.typestring
propertiesobject
urlstring

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id.
property_idstringyesProperty id or name to read.

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

FieldTypeNotes
idstring
objectstring
typestring

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:

ArgumentTypeRequiredNotes
parent_page_idstringyesId of the page to create the new page under.
titlestringyesTitle of the new page.

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

FieldTypeNotes
created_timestring (date-time)
idstring
urlstring

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:

ArgumentTypeRequiredNotes
database_idstringyesId of the database the new row belongs to.
propertiesobjectyesColumn 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):

FieldTypeNotes
created_timestring (date-time)
idstring
propertiesobject
urlstring

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id to update.
propertiesobjectyesProperty values to change, keyed by property name or id.

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

FieldTypeNotes
idstring
last_edited_timestring (date-time)
propertiesobject

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id to rename.
titlestringyesNew title text.

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

FieldTypeNotes
idstring
last_edited_timestring (date-time)
urlstring

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id to trash.

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

FieldTypeNotes
archivedboolean
idstring

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id to restore.

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

FieldTypeNotes
archivedboolean
idstring

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id to read the content of.
page_sizeintegernoResults per page, max 100. Defaults to 100.

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

FieldTypeNotes
has_moreboolean
next_cursorstring
resultsarray of object
results[].has_childrenboolean
results[].idstring
results[].typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesNotion block id.

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

FieldTypeNotes
archivedboolean
has_childrenboolean
idstring
typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesPage or block id to append content under.
childrenarray of objectyesRaw Notion block objects to append, in Notion's block schema.

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

FieldTypeNotes
resultsarray of object
results[].idstring
results[].typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesPage or block id to add the paragraph under.
textstringyesParagraph text to add.

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

FieldTypeNotes
resultsarray of object
results[].idstring
results[].typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesPage or block id to add the to-do under.
checkedbooleannoTrue to add it already checked off. Defaults to false.
textstringyesTo-do item text.

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

FieldTypeNotes
resultsarray of object
results[].idstring
results[].typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesPage or block id to add the heading under.
textstringyesHeading text.

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

FieldTypeNotes
resultsarray of object
results[].idstring
results[].typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesPage or block id to add the bullet under.
textstringyesBullet item text.

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

FieldTypeNotes
resultsarray of object
results[].idstring
results[].typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesPage or block id to add the code block under.
codestringyesSource code text.
languagestringyesLanguage tag for highlighting, e.g. "python", "javascript", "plain text".

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

FieldTypeNotes
resultsarray of object
results[].idstring
results[].typestring

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:

ArgumentTypeRequiredNotes
blockobjectyesReplacement content keyed by block type, in Notion's block schema, e.g. {"paragraph": {"rich_text": [...]}}.
block_idstringyesNotion block id to update.

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

FieldTypeNotes
idstring
last_edited_timestring (date-time)
typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesTo-do block id to check off.

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

FieldTypeNotes
idstring
to_doobject
to_do.checkedboolean
typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesTo-do block id to uncheck.

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

FieldTypeNotes
idstring
to_doobject
to_do.checkedboolean
typestring

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:

ArgumentTypeRequiredNotes
block_idstringyesNotion block id to remove.

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

FieldTypeNotes
archivedboolean
idstring

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:

ArgumentTypeRequiredNotes
database_idstringyesNotion database id.

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

FieldTypeNotes
archivedboolean
idstring
propertiesobject
titlearray of object
title[].plain_textstring
urlstring

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:

ArgumentTypeRequiredNotes
database_idstringyesNotion database id to query.
filterobjectnoNotion filter object to narrow the rows returned. Omit to return all rows.
page_sizeintegernoResults per page, max 100. Defaults to 100.
sortsarray of objectnoNotion sort objects, applied in order.

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

FieldTypeNotes
has_moreboolean
next_cursorstring
resultsarray of object
results[].idstring
results[].propertiesobject
results[].urlstring

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:

ArgumentTypeRequiredNotes
parent_page_idstringyesId of the page the new database lives under.
propertiesobjectyesColumn schema, keyed by column name, in Notion's database property-schema shape.
titlestringyesTitle of the new database.

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

FieldTypeNotes
idstring
urlstring

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:

ArgumentTypeRequiredNotes
database_idstringyesNotion database id to update.
propertiesobjectnoColumn schema changes, keyed by column name. Omit to leave columns unchanged.
titlearray of objectnoNew 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):

FieldTypeNotes
idstring
last_edited_timestring (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:

ArgumentTypeRequiredNotes
page_sizeintegernoResults per page, max 100. Defaults to 100.

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

FieldTypeNotes
has_moreboolean
next_cursorstring
resultsarray of object
results[].idstring
results[].namestring
results[].personobject
results[].person.emailstring
results[].typestring

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:

ArgumentTypeRequiredNotes
user_idstringyesNotion user id.

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

FieldTypeNotes
idstring
namestring
personobject
person.emailstring
typestring

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):

FieldTypeNotes
botobject
bot.ownerobject
bot.owner.typestring
idstring
namestring

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:

ArgumentTypeRequiredNotes
page_idstringyesNotion page id to comment on.
textstringyesComment text.

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

FieldTypeNotes
created_timestring (date-time)
idstring

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:

ArgumentTypeRequiredNotes
block_idstringyesPage or block id to read comments from.
page_sizeintegernoResults per page, max 100. Defaults to 100.

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

FieldTypeNotes
has_moreboolean
next_cursorstring
resultsarray of object
results[].created_timestring (date-time)
results[].idstring
results[].rich_textarray of object
results[].rich_text[].plain_textstring

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