grist_add_columns
Add up to 50 new columns to an existing Grist table by defining IDs, labels, and types; returns column IDs and requires user approval.
Instructions
Add new columns to an existing table of a Grist document. Returns {doc_id, table_id, column_ids}. Use grist_create_table to create a new table and grist_list_tables to see the existing columns. Requires user approval.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | The document's id from grist_list_documents, or the Document ID under the document's Settings (gear icon) in Grist. Not the shorter id in the document's address. | |
| reason | Yes | One sentence: why are you calling this tool right now? | |
| columns | Yes | A JSON array of {"id": <column id>, "label": <optional label>, "type": <optional type>} objects. Types: Text (default), Numeric, Int, Bool, Date, Choice, ChoiceList, Any, Ref:<TableId>, RefList:<TableId>. 1 to 50 columns. | |
| table_id | Yes | The table id from grist_list_tables, such as Contacts (not the label shown in Grist). |