roam_create_table
Create properly formatted tables in Roam Research by simplifying the complex nested block structure required for table creation. This tool handles container setup, validates data consistency, and converts empty cells to spaces.
Instructions
Create a table in Roam with specified headers and rows. This tool abstracts the complex nested structure that Roam tables require, making it much easier to create properly formatted tables.
Why use this tool:
Roam tables require precise nested block structures that are error-prone to create manually
Automatically handles the {{[[table]]}} container and nested column structure
Validates row/column consistency before execution
Converts empty cells to spaces (required by Roam)
Example: A table with headers ["", "Column A", "Column B"] and rows [{label: "Row 1", cells: ["A1", "B1"]}] creates a 2x3 table. IMPORTANT: Before using this tool, ensure that you have loaded into context the 'Roam Markdown Cheatsheet' resource.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_uid | Yes | The UID of the parent block or page where the table should be created. | |
| order | No | Optional: Position under the parent. Can be a number (0-based) or "first"/"last". Defaults to "last". | last |
| headers | Yes | Column headers for the table. The first header is typically empty (for the row label column). Example: ["", "Option A", "Option B"] | |
| rows | Yes | Data rows for the table. Each row has a label (first column) and cells (remaining columns). | |
| graph | No | Target graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode. | |
| write_key | No | Write confirmation key. Required for write operations on non-default graphs when write_key is configured. |