---
name: workspace-commands
description: The shell commands and task tools available in this workspace.
---
# Available commands
Python (`python` or `python3`), Perl, JavaScript/Node.js, and TypeScript
runtimes are unavailable. Use the shell commands and task CLIs documented
below; do not probe for or attempt to install other runtimes. Use `pdf-tools`
for PDFs, `notion` for Notion, and `emails` for mail operations.
Standard Unix commands, among them:
cat head tail ls find grep wc sort uniq cut tr sed awk
diff tee xargs jq unzip
with pipes, `>` redirection, `$(...)` substitution and `$'...'`.
The task CLIs below are registered with this shell rather than installed
as files; do not inspect them with `which`, `file` or `/usr/bin`.
## pdf-tools
Use `pdf-tools <command> '<JSON arguments>'`. Run
`pdf-tools <command> --help` to get more information.
| Command | Arguments | Description |
|---|---|---|
| `pdf-tools read-pdf-pages` | `{pdf_file_path: str, start_page?: int = 1, end_page?: int = 1}` | Read content from PDF file for specified page range. Supports both local file paths and URLs. For URLs, the PDF will be downloaded to a temporary directory and cached for future use. Note: Avoid reading too many pages at once (recommended: <50 pages) to prevent errors. Args: pdf_file_path: Path to the PDF file or URL to PDF start_page: Starting page number (default: 1) end_page: Ending page number (default: 1) Returns: Extracted text content from the specified pages |
| `pdf-tools get-pdf-info` | `{pdf_file_path: str}` | Get basic information about a PDF file including page count. Supports both local file paths and URLs. For URLs, the PDF will be downloaded to a temporary directory and cached for future use. Args: pdf_file_path: Path to the PDF file or URL to PDF Returns: Basic information about the PDF file |
| `pdf-tools merge-pdfs` | `{pdf_paths: list[str], output_path: str}` | Merge multiple PDF files into one. Supports both local file paths and URLs. URLs will be downloaded to temporary files before merging. Mixed local and URL paths are supported. Args: pdf_paths: List of paths to PDF files to merge (in order) - can include URLs output_path: Path where the merged PDF will be saved (must be local path) Returns: Success message with merge details or error message |
| `pdf-tools extract-pdf-pages` | `{source_path: str, page_numbers: list[int], output_path: str}` | Extract specific pages from a PDF and create a new PDF. Supports URLs for source PDF. The source PDF will be downloaded to a temporary directory if it's a URL. Output path must be a local file path. Args: source_path: Path to the source PDF file or URL to PDF page_numbers: List of page numbers to extract (1-indexed) output_path: Path where the new PDF will be saved (must be local path) Returns: Success message with extraction details or error message |
| `pdf-tools search-pdf-content` | `{pdf_file_path: str, pattern: str, page_size?: int = 10}` | Search for regex pattern in PDF content and return paginated results. Supports both local file paths and URLs. For URLs, the PDF will be downloaded to a temporary directory and cached for future use. Args: pdf_file_path: Path to the PDF file or URL to PDF pattern: Regular expression pattern to search for page_size: Number of results per page (10-50, default: 10) Returns: Search results with UUID for pagination, or error message |
| `pdf-tools search-pdf-next-page` | `{search_id: str}` | Get next page of search results. Args: search_id: Search session ID from previous search Returns: Next page of search results or error message |
| `pdf-tools search-pdf-prev-page` | `{search_id: str}` | Get previous page of search results. Args: search_id: Search session ID from previous search Returns: Previous page of search results or error message |
| `pdf-tools search-pdf-go-page` | `{search_id: str, page_number: int}` | Go to specific page of search results. Args: search_id: Search session ID from previous search page_number: Page number to go to (1-indexed) Returns: Specified page of search results or error message |
| `pdf-tools search-pdf-info` | `{search_id: str}` | Get information about a search session. Args: search_id: Search session ID from previous search Returns: Information about the search session |
## notion
Use `notion <command> '<JSON arguments>'`. Run `notion <command> --help` to
get more information.
| Command | Arguments | Description |
|---|---|---|
| `notion get-user` | `{user_id: str}` | Notion \| Retrieve a user |
| `notion get-users` | `{start_cursor?: str, page_size?: int = 100}` | Notion \| List all users — `start_cursor`: If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; `page_size`: The number of items from the full list desired in the response. Maximum: 100 |
| `notion get-self` | `{}` | Notion \| Retrieve your token's bot user |
| `notion post-database-query` | `{database_id: str, filter_properties?: list[str], filter?: dict, sorts?: list[{property: str, direction: "ascending" \| "descending"}], start_cursor?: str, page_size?: int = 100, archived?: bool, in_trash?: bool}` | Notion \| Query a database — `database_id`: Identifier for a Notion database.; `filter_properties`: A list of page property value IDs associated with the database. Use this param to limit the response to a specific page property value or values for pages that meet the `filter` criteria.; `filter`: When supplied, limits which pages are returned based on the [filter conditions](ref:post-database-query-filter).; `sorts`: When supplied, orders the results based on the provided [sort criteria](ref:post-database-query-sort).; `start_cursor`: When supplied, returns a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; `page_size`: The number of items from the full list desired in the response. Maximum: 100 |
| `notion post-search` | `{query?: str, sort?: {direction?: str, timestamp?: str}, filter?: {value?: str, property?: str}, start_cursor?: str, page_size?: int = 100}` | Notion \| Search by title — `query`: The text that the API compares page and database titles against.; `sort`: A set of criteria, `direction` and `timestamp` keys, that orders the results. The **only** supported timestamp value is `"last_edited_time"`. Supported `direction` values are `"ascending"` and `"descending"`. If `sort` is not provided, then the most recently edited results are returned first.; `sort.direction`: The direction to sort. Possible values include `ascending` and `descending`.; `sort.timestamp`: The name of the timestamp to sort against. Possible values include `last_edited_time`.; `filter`: A set of criteria, `value` and `property` keys, that limits the results to either only pages or only databases. Possible `value` values are `"page"` or `"database"`. The only supported `property` value is `"object"`.; `filter.value`: The value of the property to filter the results by. Possible values for object type include `page` or `database`. **Limitation**: Currently the only filter allowed is `object` which will filter by type of object (either `page` or `database`); `filter.property`: The name of the property to filter by. Currently the only property you can filter by is the object type. Possible values include `object`. Limitation: Currently the only filter allowed is `object` which will filter by type of object (either `page` or `database`); `start_cursor`: A `cursor` value returned in a previous response that If supplied, limits the response to results starting after the `cursor`. If not supplied, then the first page of results is returned. Refer to [pagination](https://developers.notion.com/reference/intro#pagination) for more details.; `page_size`: The number of items from the full list to include in the response. Maximum: `100`. |
| `notion get-block-children` | `{block_id: str, start_cursor?: str, page_size?: int = 100}` | Notion \| Retrieve block children — `block_id`: Identifier for a [block](ref:block); `start_cursor`: If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; `page_size`: The number of items from the full list desired in the response. Maximum: 100 |
| `notion patch-block-children` | `{block_id: str, children: list[{paragraph?: {rich_text: list[{text: {content: str, link?: dict \| null}, type?: "text"}]}, bulleted_list_item?: {rich_text: list[{text: {content: str, link?: dict \| null}, type?: "text"}]}, type?: "paragraph" \| "bulleted_list_item"}], after?: str}` | Notion \| Append block children — `block_id`: Identifier for a [block](ref:block). Also accepts a [page](ref:page) ID.; `children`: Child content to append to a container block as an array of [block objects](ref:block); `after`: The ID of the existing block that the new block should be appended after. |
| `notion retrieve-a-block` | `{block_id: str}` | Notion \| Retrieve a block — `block_id`: Identifier for a Notion block |
| `notion update-a-block` | `{block_id: str, type?: dict, archived?: bool = true}` | Notion \| Update a block — `block_id`: Identifier for a Notion block; `type`: The [block object `type`](ref:block#block-object-keys) value with the properties to be updated. Currently only `text` (for supported block types) and `checked` (for `to_do` blocks) fields can be updated.; `archived`: Set to true to archive (delete) a block. Set to false to un-archive (restore) a block. |
| `notion delete-a-block` | `{block_id: str}` | Notion \| Delete a block — `block_id`: Identifier for a Notion block |
| `notion retrieve-a-page` | `{page_id: str, filter_properties?: str}` | Notion \| Retrieve a page — `page_id`: Identifier for a Notion page; `filter_properties`: A list of page property value IDs associated with the page. Use this param to limit the response to a specific page property value or values. To retrieve multiple properties, specify each page property ID. For example: `?filter_properties=iAk8&filter_properties=b7dh`. |
| `notion patch-page` | `{page_id: str, properties?: dict, in_trash?: bool = false, archived?: bool, icon?: {emoji: str}, cover?: {external: {url: str}, type?: "external"}}` | Notion \| Update page properties — `page_id`: The identifier for the Notion page to be updated.; `properties`: Property values to update. Keys are property names or IDs; values are property value objects. Title is no longer required.; `in_trash`: Set to true to delete a block. Set to false to restore a block.; `icon`: A page icon for the page. Supported types are [external file object](https://developers.notion.com/reference/file-object) or [emoji object](https://developers.notion.com/reference/emoji-object).; `cover`: A cover image for the page. Only [external file objects](https://developers.notion.com/reference/file-object) are supported. |
| `notion post-page` | `{parent: {page_id: str} \| {database_id: str, type?: any} \| {data_source_id: str, type?: any}, properties: dict, children?: list[str], icon?: str, cover?: str}` | Notion \| Create a page — `properties`: Property values for the new page. Keys are property names or IDs; values are property value objects.; `children`: The content to be rendered on the new page, represented as an array of [block objects](https://developers.notion.com/reference/block).; `icon`: The icon of the new page. Either an [emoji object](https://developers.notion.com/reference/emoji-object) or an [external file object](https://developers.notion.com/reference/file-object)..; `cover`: The cover image of the new page, represented as a [file object](https://developers.notion.com/reference/file-object). |
| `notion create-a-database` | `{parent: {type: "page_id", page_id: str}, properties: dict[str, {title: dict, description?: str}], title?: list[{text: {content: str, link?: dict \| null}, type?: "text"}]}` | Notion \| Create a database — `properties`: Property schema of database. The keys are the names of properties as they appear in Notion and the values are [property schema objects](https://developers.notion.com/reference/property-schema-object). |
| `notion update-a-database` | `{database_id: str, title?: list[{text: {content: str, link?: dict \| null}, type?: "text"}], description?: list[{text: {content: str, link?: dict \| null}, type?: "text"}], properties?: {name?: str}}` | Notion \| Update a database — `database_id`: identifier for a Notion database; `title`: An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the title of the database that is displayed in the Notion UI. If omitted, then the database title remains unchanged.; `description`: An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the description of the database that is displayed in the Notion UI. If omitted, then the database description remains unchanged.; `properties`: Property schema of database. The keys are the names of properties as they appear in Notion and the values are [property schema objects](https://developers.notion.com/reference/property-schema-object). |
| `notion retrieve-a-database` | `{database_id: str}` | Notion \| Retrieve a database — `database_id`: An identifier for the Notion database. |
| `notion retrieve-a-page-property` | `{page_id: str, property_id: str, page_size?: int, start_cursor?: str}` | Notion \| Retrieve a page property item — `page_id`: Identifier for a Notion page; `property_id`: Identifier for a page [property](https://developers.notion.com/reference/page#all-property-values); `page_size`: For paginated properties. The max number of property item objects on a page. The default size is 100; `start_cursor`: For paginated properties. |
| `notion retrieve-a-comment` | `{block_id: str, start_cursor?: str, page_size?: int}` | Notion \| Retrieve comments — `block_id`: Identifier for a Notion block or page; `start_cursor`: If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; `page_size`: The number of items from the full list desired in the response. Maximum: 100 |
| `notion create-a-comment` | `{parent: {page_id: str}, rich_text: list[{text: {content: str}}]}` | Notion \| Create comment — `parent`: The page that contains the comment; `parent.page_id`: the page ID; `rich_text.text.content`: The content of the comment |
## emails
Use `emails <command> '<JSON arguments>'`. Run `emails <command> --help` to
get more information.
| Command | Arguments | Description |
|---|---|---|
| `emails get-emails` | `{folder?: str = "INBOX", page?: int = 1, page_size?: int = 20}` | Get paginated list of emails from specified folder Args: folder: Email folder name (default: INBOX) page: Page number starting from 1 (default: 1) page_size: Number of emails per page (default: 20) |
| `emails read-email` | `{email_id: str}` | Read full content of a specific email Args: email_id: Email ID to read |
| `emails search-emails` | `{query: str, folder?: str = "INBOX", page?: int = 1, page_size?: int = 20}` | Search emails with query string (sorted by date descending) Args: query: Search query (subject, from, body content) folder: Folder to search in (default: INBOX) page: Page number starting from 1 (default: 1) page_size: Number of results per page (default: 20) |
| `emails send-email` | `{to: str, subject: str, body: str, html_body?: str = null, cc?: str = null, bcc?: str = null, attachments?: list[str] = null}` | Send an email with optional HTML body, CC, BCC, and attachments Args: to: Recipient email address(es), comma-separated subject: Email subject body: Plain text body html_body: HTML body content (optional) cc: CC recipients, comma-separated (optional) bcc: BCC recipients, comma-separated (optional) attachments: List of file paths to attach (optional) |
| `emails reply-email` | `{email_id: str, body: str, html_body?: str = null, cc?: str = null, bcc?: str = null, reply_all?: bool = false}` | Reply to an email Args: email_id: ID of email to reply to body: Reply message body (plain text) html_body: Reply message body (HTML, optional) cc: Additional CC recipients (optional) bcc: BCC recipients (optional) reply_all: Whether to reply to all recipients (default: False) |
| `emails forward-email` | `{email_id: str, to: str, body?: str = null, html_body?: str = null, cc?: str = null, bcc?: str = null}` | Forward an email to other recipients Args: email_id: ID of email to forward to: Recipients to forward to body: Additional message body (optional) html_body: Additional HTML message body (optional) cc: CC recipients (optional) bcc: BCC recipients (optional) |
| `emails delete-email` | `{email_id: str}` | Delete an email Args: email_id: Email ID to delete |
| `emails move-email` | `{email_id: str, target_folder: str}` | Move email to another folder Args: email_id: Email ID to move target_folder: Target folder name |
| `emails mark-emails` | `{email_ids: list[str], status: str}` | Mark multiple emails with status (read/unread/important/not_important) Args: email_ids: List of email IDs to mark status: Status to set (read, unread, important, not_important) |
| `emails move-emails` | `{email_ids: list[str], target_folder: str}` | Move multiple emails to another folder with improved ID synchronization Args: email_ids: List of email IDs to move target_folder: Target folder name |
| `emails delete-emails` | `{email_ids: list[str]}` | Delete multiple emails with improved ID synchronization Args: email_ids: List of email IDs to delete |
| `emails get-folders` | `{}` | Get list of available email folders |
| `emails create-folder` | `{folder_name: str}` | Create new email folder Args: folder_name: Name of folder to create |
| `emails delete-folder` | `{folder_name: str}` | Delete email folder Args: folder_name: Name of folder to delete |
| `emails get-mailbox-stats` | `{folder_name?: str = null}` | Get mailbox statistics Args: folder_name: Specific folder name (optional, defaults to all folders) |
| `emails get-unread-count` | `{folder_name?: str = null}` | Get unread message count Args: folder_name: Specific folder name (optional, defaults to all folders) |
| `emails check-connection` | `{}` | Check email server connection status |
| `emails get-email-headers` | `{email_id: str}` | Get complete email headers for technical analysis Args: email_id: Email ID to get headers for |
| `emails save-draft` | `{subject: str, body: str, html_body?: str = null, to?: str = null, cc?: str = null, bcc?: str = null}` | Save email draft Args: subject: Email subject body: Plain text body html_body: HTML body content (optional) to: Recipient email address(es) (optional) cc: CC recipients (optional) bcc: BCC recipients (optional) |
| `emails get-drafts` | `{page?: int = 1, page_size?: int = 20}` | Get list of saved drafts Args: page: Page number starting from 1 (default: 1) page_size: Number of drafts per page (default: 20) |
| `emails update-draft` | `{draft_id: str, subject?: str = null, body?: str = null, html_body?: str = null, to?: str = null, cc?: str = null, bcc?: str = null}` | Update existing draft Args: draft_id: Draft ID to update subject: Email subject (optional) body: Plain text body (optional) html_body: HTML body content (optional) to: Recipient email address(es) (optional) cc: CC recipients (optional) bcc: BCC recipients (optional) |
| `emails delete-draft` | `{draft_id: str}` | Delete draft Args: draft_id: Draft ID to delete |
| `emails export-emails` | `{folder?: str = null, export_path?: str = "emails_export.json", max_emails?: int = null, export_all_folders?: bool = false}` | Export emails to file for backup Args: folder: Specific folder to export (mutually exclusive with export_all_folders) export_path: Path where to save the export file max_emails: Maximum number of emails to export (optional, exports all if not specified) export_all_folders: Export from all folders instead of just one (default: False) |
| `emails import-emails` | `{import_path: str, target_folder?: str = null, preserve_folders?: bool = true}` | Import emails from backup file to IMAP server Args: import_path: Path to import file (.json or .eml) or a directory target_folder: Target folder for imported emails (if preserve_folders=False) preserve_folders: Whether to preserve original folder structure (default: True) |
| `emails download-attachment` | `{email_id: str, attachment_filename: str}` | Download email attachment to configured download path Args: email_id: Email ID containing the attachment attachment_filename: Name of attachment to download |
| name | workspace-commands |
|---|
| description | The shell commands and task tools available in this workspace. |
|---|
Available commands
Python (python or python3), Perl, JavaScript/Node.js, and TypeScript runtimes are unavailable. Use the shell commands and task CLIs documented below; do not probe for or attempt to install other runtimes. Use pdf-tools for PDFs, notion for Notion, and emails for mail operations.
Standard Unix commands, among them:
cat head tail ls find grep wc sort uniq cut tr sed awk
diff tee xargs jq unzip
with pipes, > redirection, $(...) substitution and $'...'.
The task CLIs below are registered with this shell rather than installed as files; do not inspect them with which, file or /usr/bin.
pdf-tools
Use pdf-tools <command> '<JSON arguments>'. Run pdf-tools <command> --help to get more information.
| Command | Arguments | Description |
|---|
pdf-tools read-pdf-pages | {pdf_file_path: str, start_page?: int = 1, end_page?: int = 1} | Read content from PDF file for specified page range. Supports both local file paths and URLs. For URLs, the PDF will be downloaded to a temporary directory and cached for future use. Note: Avoid reading too many pages at once (recommended: <50 pages) to prevent errors. Args: pdf_file_path: Path to the PDF file or URL to PDF start_page: Starting page number (default: 1) end_page: Ending page number (default: 1) Returns: Extracted text content from the specified pages |
pdf-tools get-pdf-info | {pdf_file_path: str} | Get basic information about a PDF file including page count. Supports both local file paths and URLs. For URLs, the PDF will be downloaded to a temporary directory and cached for future use. Args: pdf_file_path: Path to the PDF file or URL to PDF Returns: Basic information about the PDF file |
pdf-tools merge-pdfs | {pdf_paths: list[str], output_path: str} | Merge multiple PDF files into one. Supports both local file paths and URLs. URLs will be downloaded to temporary files before merging. Mixed local and URL paths are supported. Args: pdf_paths: List of paths to PDF files to merge (in order) - can include URLs output_path: Path where the merged PDF will be saved (must be local path) Returns: Success message with merge details or error message |
pdf-tools extract-pdf-pages | {source_path: str, page_numbers: list[int], output_path: str} | Extract specific pages from a PDF and create a new PDF. Supports URLs for source PDF. The source PDF will be downloaded to a temporary directory if it's a URL. Output path must be a local file path. Args: source_path: Path to the source PDF file or URL to PDF page_numbers: List of page numbers to extract (1-indexed) output_path: Path where the new PDF will be saved (must be local path) Returns: Success message with extraction details or error message |
pdf-tools search-pdf-content | {pdf_file_path: str, pattern: str, page_size?: int = 10} | Search for regex pattern in PDF content and return paginated results. Supports both local file paths and URLs. For URLs, the PDF will be downloaded to a temporary directory and cached for future use. Args: pdf_file_path: Path to the PDF file or URL to PDF pattern: Regular expression pattern to search for page_size: Number of results per page (10-50, default: 10) Returns: Search results with UUID for pagination, or error message |
pdf-tools search-pdf-next-page | {search_id: str} | Get next page of search results. Args: search_id: Search session ID from previous search Returns: Next page of search results or error message |
pdf-tools search-pdf-prev-page | {search_id: str} | Get previous page of search results. Args: search_id: Search session ID from previous search Returns: Previous page of search results or error message |
pdf-tools search-pdf-go-page | {search_id: str, page_number: int} | Go to specific page of search results. Args: search_id: Search session ID from previous search page_number: Page number to go to (1-indexed) Returns: Specified page of search results or error message |
pdf-tools search-pdf-info | {search_id: str} | Get information about a search session. Args: search_id: Search session ID from previous search Returns: Information about the search session |
notion
Use notion <command> '<JSON arguments>'. Run notion <command> --help to get more information.
| Command | Arguments | Description |
|---|
notion get-user | {user_id: str} | Notion \ | Retrieve a user |
notion get-users | {start_cursor?: str, page_size?: int = 100} | Notion \ | List all users — start_cursor: If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; page_size: The number of items from the full list desired in the response. Maximum: 100 |
notion get-self | {} | Notion \ | Retrieve your token's bot user |
notion post-database-query | `{database_id: str, filter_properties?: list[str], filter?: dict, sorts?: list[{property: str, direction: "ascending" \ | "descending"}], start_cursor?: str, page_size?: int = 100, archived?: bool, in_trash?: bool}` | Notion \ | Query a database — database_id: Identifier for a Notion database.; filter_properties: A list of page property value IDs associated with the database. Use this param to limit the response to a specific page property value or values for pages that meet the filter criteria.; filter: When supplied, limits which pages are returned based on the [filter conditions](ref:post-database-query-filter).; sorts: When supplied, orders the results based on the provided [sort criteria](ref:post-database-query-sort).; start_cursor: When supplied, returns a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; page_size: The number of items from the full list desired in the response. Maximum: 100 |
notion post-search | {query?: str, sort?: {direction?: str, timestamp?: str}, filter?: {value?: str, property?: str}, start_cursor?: str, page_size?: int = 100} | Notion \ | Search by title — query: The text that the API compares page and database titles against.; sort: A set of criteria, direction and timestamp keys, that orders the results. The **only** supported timestamp value is "last_edited_time". Supported direction values are "ascending" and "descending". If sort is not provided, then the most recently edited results are returned first.; sort.direction: The direction to sort. Possible values include ascending and descending.; sort.timestamp: The name of the timestamp to sort against. Possible values include last_edited_time.; filter: A set of criteria, value and property keys, that limits the results to either only pages or only databases. Possible value values are "page" or "database". The only supported property value is "object".; filter.value: The value of the property to filter the results by. Possible values for object type include page or database. **Limitation**: Currently the only filter allowed is object which will filter by type of object (either page or database); filter.property: The name of the property to filter by. Currently the only property you can filter by is the object type. Possible values include object. Limitation: Currently the only filter allowed is object which will filter by type of object (either page or database); start_cursor: A cursor value returned in a previous response that If supplied, limits the response to results starting after the cursor. If not supplied, then the first page of results is returned. Refer to [pagination](https://developers.notion.com/reference/intro#pagination) for more details.; page_size: The number of items from the full list to include in the response. Maximum: 100. |
notion get-block-children | {block_id: str, start_cursor?: str, page_size?: int = 100} | Notion \ | Retrieve block children — block_id: Identifier for a [block](ref:block); start_cursor: If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; page_size: The number of items from the full list desired in the response. Maximum: 100 |
notion patch-block-children | `{block_id: str, children: list[{paragraph?: {rich_text: list[{text: {content: str, link?: dict \ | null}, type?: "text"}]}, bulleted_list_item?: {rich_text: list[{text: {content: str, link?: dict \ | null}, type?: "text"}]}, type?: "paragraph" \ | "bulleted_list_item"}], after?: str}` | Notion \ | Append block children — block_id: Identifier for a [block](ref:block). Also accepts a [page](ref:page) ID.; children: Child content to append to a container block as an array of [block objects](ref:block); after: The ID of the existing block that the new block should be appended after. |
notion retrieve-a-block | {block_id: str} | Notion \ | Retrieve a block — block_id: Identifier for a Notion block |
notion update-a-block | {block_id: str, type?: dict, archived?: bool = true} | Notion \ | Update a block — block_id: Identifier for a Notion block; type: The [block object type](ref:block#block-object-keys) value with the properties to be updated. Currently only text (for supported block types) and checked (for to_do blocks) fields can be updated.; archived: Set to true to archive (delete) a block. Set to false to un-archive (restore) a block. |
notion delete-a-block | {block_id: str} | Notion \ | Delete a block — block_id: Identifier for a Notion block |
notion retrieve-a-page | {page_id: str, filter_properties?: str} | Notion \ | Retrieve a page — page_id: Identifier for a Notion page; filter_properties: A list of page property value IDs associated with the page. Use this param to limit the response to a specific page property value or values. To retrieve multiple properties, specify each page property ID. For example: ?filter_properties=iAk8&filter_properties=b7dh. |
notion patch-page | {page_id: str, properties?: dict, in_trash?: bool = false, archived?: bool, icon?: {emoji: str}, cover?: {external: {url: str}, type?: "external"}} | Notion \ | Update page properties — page_id: The identifier for the Notion page to be updated.; properties: Property values to update. Keys are property names or IDs; values are property value objects. Title is no longer required.; in_trash: Set to true to delete a block. Set to false to restore a block.; icon: A page icon for the page. Supported types are [external file object](https://developers.notion.com/reference/file-object) or [emoji object](https://developers.notion.com/reference/emoji-object).; cover: A cover image for the page. Only [external file objects](https://developers.notion.com/reference/file-object) are supported. |
notion post-page | `{parent: {page_id: str} \ | {database_id: str, type?: any} \ | {data_source_id: str, type?: any}, properties: dict, children?: list[str], icon?: str, cover?: str}` | Notion \ | Create a page — properties: Property values for the new page. Keys are property names or IDs; values are property value objects.; children: The content to be rendered on the new page, represented as an array of [block objects](https://developers.notion.com/reference/block).; icon: The icon of the new page. Either an [emoji object](https://developers.notion.com/reference/emoji-object) or an [external file object](https://developers.notion.com/reference/file-object)..; cover: The cover image of the new page, represented as a [file object](https://developers.notion.com/reference/file-object). |
notion create-a-database | `{parent: {type: "page_id", page_id: str}, properties: dict[str, {title: dict, description?: str}], title?: list[{text: {content: str, link?: dict \ | null}, type?: "text"}]}` | Notion \ | Create a database — properties: Property schema of database. The keys are the names of properties as they appear in Notion and the values are [property schema objects](https://developers.notion.com/reference/property-schema-object). |
notion update-a-database | `{database_id: str, title?: list[{text: {content: str, link?: dict \ | null}, type?: "text"}], description?: list[{text: {content: str, link?: dict \ | null}, type?: "text"}], properties?: {name?: str}}` | Notion \ | Update a database — database_id: identifier for a Notion database; title: An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the title of the database that is displayed in the Notion UI. If omitted, then the database title remains unchanged.; description: An array of [rich text objects](https://developers.notion.com/reference/rich-text) that represents the description of the database that is displayed in the Notion UI. If omitted, then the database description remains unchanged.; properties: Property schema of database. The keys are the names of properties as they appear in Notion and the values are [property schema objects](https://developers.notion.com/reference/property-schema-object). |
notion retrieve-a-database | {database_id: str} | Notion \ | Retrieve a database — database_id: An identifier for the Notion database. |
notion retrieve-a-page-property | {page_id: str, property_id: str, page_size?: int, start_cursor?: str} | Notion \ | Retrieve a page property item — page_id: Identifier for a Notion page; property_id: Identifier for a page [property](https://developers.notion.com/reference/page#all-property-values); page_size: For paginated properties. The max number of property item objects on a page. The default size is 100; start_cursor: For paginated properties. |
notion retrieve-a-comment | {block_id: str, start_cursor?: str, page_size?: int} | Notion \ | Retrieve comments — block_id: Identifier for a Notion block or page; start_cursor: If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.; page_size: The number of items from the full list desired in the response. Maximum: 100 |
notion create-a-comment | {parent: {page_id: str}, rich_text: list[{text: {content: str}}]} | Notion \ | Create comment — parent: The page that contains the comment; parent.page_id: the page ID; rich_text.text.content: The content of the comment |
emails
Use emails <command> '<JSON arguments>'. Run emails <command> --help to get more information.
| Command | Arguments | Description |
|---|
emails get-emails | {folder?: str = "INBOX", page?: int = 1, page_size?: int = 20} | Get paginated list of emails from specified folder Args: folder: Email folder name (default: INBOX) page: Page number starting from 1 (default: 1) page_size: Number of emails per page (default: 20) |
emails read-email | {email_id: str} | Read full content of a specific email Args: email_id: Email ID to read |
emails search-emails | {query: str, folder?: str = "INBOX", page?: int = 1, page_size?: int = 20} | Search emails with query string (sorted by date descending) Args: query: Search query (subject, from, body content) folder: Folder to search in (default: INBOX) page: Page number starting from 1 (default: 1) page_size: Number of results per page (default: 20) |
emails send-email | {to: str, subject: str, body: str, html_body?: str = null, cc?: str = null, bcc?: str = null, attachments?: list[str] = null} | Send an email with optional HTML body, CC, BCC, and attachments Args: to: Recipient email address(es), comma-separated subject: Email subject body: Plain text body html_body: HTML body content (optional) cc: CC recipients, comma-separated (optional) bcc: BCC recipients, comma-separated (optional) attachments: List of file paths to attach (optional) |
emails reply-email | {email_id: str, body: str, html_body?: str = null, cc?: str = null, bcc?: str = null, reply_all?: bool = false} | Reply to an email Args: email_id: ID of email to reply to body: Reply message body (plain text) html_body: Reply message body (HTML, optional) cc: Additional CC recipients (optional) bcc: BCC recipients (optional) reply_all: Whether to reply to all recipients (default: False) |
emails forward-email | {email_id: str, to: str, body?: str = null, html_body?: str = null, cc?: str = null, bcc?: str = null} | Forward an email to other recipients Args: email_id: ID of email to forward to: Recipients to forward to body: Additional message body (optional) html_body: Additional HTML message body (optional) cc: CC recipients (optional) bcc: BCC recipients (optional) |
emails delete-email | {email_id: str} | Delete an email Args: email_id: Email ID to delete |
emails move-email | {email_id: str, target_folder: str} | Move email to another folder Args: email_id: Email ID to move target_folder: Target folder name |
emails mark-emails | {email_ids: list[str], status: str} | Mark multiple emails with status (read/unread/important/not_important) Args: email_ids: List of email IDs to mark status: Status to set (read, unread, important, not_important) |
emails move-emails | {email_ids: list[str], target_folder: str} | Move multiple emails to another folder with improved ID synchronization Args: email_ids: List of email IDs to move target_folder: Target folder name |
emails delete-emails | {email_ids: list[str]} | Delete multiple emails with improved ID synchronization Args: email_ids: List of email IDs to delete |
emails get-folders | {} | Get list of available email folders |
emails create-folder | {folder_name: str} | Create new email folder Args: folder_name: Name of folder to create |
emails delete-folder | {folder_name: str} | Delete email folder Args: folder_name: Name of folder to delete |
emails get-mailbox-stats | {folder_name?: str = null} | Get mailbox statistics Args: folder_name: Specific folder name (optional, defaults to all folders) |
emails get-unread-count | {folder_name?: str = null} | Get unread message count Args: folder_name: Specific folder name (optional, defaults to all folders) |
emails check-connection | {} | Check email server connection status |
emails get-email-headers | {email_id: str} | Get complete email headers for technical analysis Args: email_id: Email ID to get headers for |
emails save-draft | {subject: str, body: str, html_body?: str = null, to?: str = null, cc?: str = null, bcc?: str = null} | Save email draft Args: subject: Email subject body: Plain text body html_body: HTML body content (optional) to: Recipient email address(es) (optional) cc: CC recipients (optional) bcc: BCC recipients (optional) |
emails get-drafts | {page?: int = 1, page_size?: int = 20} | Get list of saved drafts Args: page: Page number starting from 1 (default: 1) page_size: Number of drafts per page (default: 20) |
emails update-draft | {draft_id: str, subject?: str = null, body?: str = null, html_body?: str = null, to?: str = null, cc?: str = null, bcc?: str = null} | Update existing draft Args: draft_id: Draft ID to update subject: Email subject (optional) body: Plain text body (optional) html_body: HTML body content (optional) to: Recipient email address(es) (optional) cc: CC recipients (optional) bcc: BCC recipients (optional) |
emails delete-draft | {draft_id: str} | Delete draft Args: draft_id: Draft ID to delete |
emails export-emails | {folder?: str = null, export_path?: str = "emails_export.json", max_emails?: int = null, export_all_folders?: bool = false} | Export emails to file for backup Args: folder: Specific folder to export (mutually exclusive with export_all_folders) export_path: Path where to save the export file max_emails: Maximum number of emails to export (optional, exports all if not specified) export_all_folders: Export from all folders instead of just one (default: False) |
emails import-emails | {import_path: str, target_folder?: str = null, preserve_folders?: bool = true} | Import emails from backup file to IMAP server Args: import_path: Path to import file (.json or .eml) or a directory target_folder: Target folder for imported emails (if preserve_folders=False) preserve_folders: Whether to preserve original folder structure (default: True) |
emails download-attachment | {email_id: str, attachment_filename: str} | Download email attachment to configured download path Args: email_id: Email ID containing the attachment attachment_filename: Name of attachment to download |