Skip to main content

Dataset tools

Datasets are reusable, organization-scoped bulk-create data sources (Canva-style "Bulk Create"). A dataset has a typed column schema and a list of rows; once bound to a design it drives one exported record per row. These tools let you discover, create, fill and manage datasets without an editor session.

Working with cells

To keep things simple, rows are plain objects keyed by column name (case-insensitive) or column id. You do not need to send the internal cell structure:

{ "Title": "Summer Sale", "Price": "19.99", "Active": "yes", "Photo": "https://cdn.example.com/a.jpg" }

Values are coerced to the column's type:

Column typeAcceptsNotes
textany valueConverted to a string
selectany valueFree-text at the dataset level (see note below)
booleantrue/false, or "yes", "true", "1", "ja", "on"Anything else is false
image / videoa URL (http(s)://…), an asset id, or { "assetId": "…" } / { "url": "…" }A bare string starting with http is treated as an external URL; otherwise it is treated as a library asset id

Omitted columns are blank-filled; unknown keys are ignored. Datasets are limited to 300 rows and 150 columns.

Media asset ids are validated. When you reference a library asset id in an image/video cell, it must be a real, non-deleted asset in the organization (use get-assets to find ids). A non-existent id makes the write fail with a clear error instead of silently storing an empty image. Public URLs are accepted as-is.

select columns are free-text at the dataset level: there is no fixed option list stored on the column (the constrained option set lives on the template control the column is bound to). To help you stay consistent, get-dataset returns the distinct values already used in each select column as distinctValues.

Permissions: reading (get-datasets, get-dataset) only needs authentication. All mutating tools require the design.create permission in the organization (the same requirement as the REST dataset endpoints).


get-datasets

List the organization's datasets with their column schema and row counts.

Parameters

None.

Response

FieldTypeDescription
datasetsarrayList of datasets
datasets[].idstringDataset identifier
datasets[].namestringDataset name
datasets[].originstringcsv | xlsx | manual | sheet | api
datasets[].rowCountnumberNumber of rows
datasets[].columnsarrayColumn schema (id, name, type)
datasets[].createdAtstringISO date
datasets[].updatedAtstringISO date
countnumberTotal number of datasets

Example

{
"tool": "get-datasets",
"arguments": {}
}

get-dataset

Get a single dataset including its column schema and rows (paginated). Cell values are returned as plain values keyed by column name.

Parameters

ParameterTypeRequiredDescription
datasetIdstringYesId of the dataset (from get-datasets)
offsetnumberNoRow offset for pagination (default 0)
limitnumberNoMax rows to return (default 100, max 300)

Response

FieldTypeDescription
successbooleanWhether the dataset was found
dataset.idstringDataset id
dataset.namestringDataset name
dataset.originstringData origin
dataset.rowCountnumberTotal rows in the dataset
dataset.columnsarrayColumn schema (id, name, type)
dataset.columns[].distinctValuesstring[]select columns only: distinct values already in use (up to 50), as a fill hint
rowsarrayThe page of rows
rows[].idstringRow id (stable; use it with upsert-dataset-rows / delete-dataset-rows)
rows[].valuesobjectCell values keyed by column name
totalnumberTotal rows (for pagination)

Example

{
"tool": "get-dataset",
"arguments": { "datasetId": "<dataset id>", "limit": 50 }
}

create-dataset

Create a new dataset by defining its columns and (optionally) seeding initial rows.

Parameters

ParameterTypeRequiredDescription
namestringYesDataset name
columnsarrayYesColumn definitions (name, optional type), 1–150 entries
columns[].namestringYesColumn header / field name
columns[].typestringNotext (default), image, video, boolean, select
rowsarrayNoInitial rows; each row is an object keyed by column name (or id), max 300

Column ids are generated automatically from the column names (e.g. "Product Title"product-title); colliding names get a unique id.

Response

FieldTypeDescription
successbooleanWhether the dataset was created
dataset.idstringId of the new dataset
dataset.namestringName
dataset.rowCountnumberNumber of seeded rows
dataset.columnsarrayThe resolved column schema (with generated ids)
messagestringConfirmation message

Example

{
"tool": "create-dataset",
"arguments": {
"name": "Summer Products",
"columns": [
{ "name": "Title", "type": "text" },
{ "name": "Price", "type": "text" },
{ "name": "Photo", "type": "image" },
{ "name": "On Sale", "type": "boolean" }
],
"rows": [
{ "Title": "Sunglasses", "Price": "19.99", "Photo": "https://cdn.example.com/s.jpg", "On Sale": "yes" }
]
}
}

add-dataset-rows

Append rows to an existing dataset (fill it with data) without touching the rows already there.

Parameters

ParameterTypeRequiredDescription
datasetIdstringYesId of the dataset to fill
rowsarrayYesRows to append; each row is an object keyed by column name (or id), 1–300

The call is rejected if it would push the dataset over the 300-row limit.

Response

FieldTypeDescription
successbooleanWhether the rows were appended
datasetIdstringThe dataset id
addednumberNumber of rows inserted
rowCountnumberNew total row count
messagestringConfirmation message

Example

{
"tool": "add-dataset-rows",
"arguments": {
"datasetId": "<dataset id>",
"rows": [
{ "Title": "Beach Towel", "Price": "12.50", "On Sale": "no" },
{ "Title": "Flip Flops", "Price": "8.00", "On Sale": "yes" }
]
}
}

replace-dataset-rows

Replace all rows of a dataset with the provided rows. The previous rows are discarded. Pass an empty array to clear the dataset. Use add-dataset-rows instead to append without removing existing data.

Parameters

ParameterTypeRequiredDescription
datasetIdstringYesId of the dataset
rowsarrayYesThe complete new set of rows (object keyed by column name), max 300

Response

FieldTypeDescription
successbooleanWhether the rows were replaced
datasetIdstringThe dataset id
rowCountnumberNew total row count
messagestringConfirmation message

Example

{
"tool": "replace-dataset-rows",
"arguments": {
"datasetId": "<dataset id>",
"rows": [{ "Title": "New Product", "Price": "29.99" }]
}
}

upsert-dataset-rows

Update specific rows by id and/or insert new rows, leaving all other rows untouched. This is the right tool for editing a few rows of a larger dataset. Unlike replace-dataset-rows, you don't have to re-send the whole dataset.

Parameters

ParameterTypeRequiredDescription
datasetIdstringYesId of the dataset
rowsarrayYesRows to update/insert, 1–300
rows[].idstringNoExisting row id (from get-dataset) to update. Omit (or pass an unknown id) to insert a new row
rows[].valuesobjectYesCell values keyed by column name (or id)

The id is a separate field (not inside values) so it can never collide with a column literally named id.

Response

FieldTypeDescription
successbooleanWhether the upsert succeeded
datasetIdstringThe dataset id
updatednumberNumber of existing rows updated
insertednumberNumber of new rows inserted
rowCountnumberNew total row count
messagestringConfirmation message

Example

{
"tool": "upsert-dataset-rows",
"arguments": {
"datasetId": "<dataset id>",
"rows": [
{ "id": "<existing row id>", "values": { "Price": "14.99" } },
{ "values": { "Title": "Brand New Item", "Price": "5.00" } }
]
}
}

delete-dataset-rows

Delete specific rows by their ids, leaving the rest intact. To clear the whole dataset, use replace-dataset-rows with an empty array instead.

Parameters

ParameterTypeRequiredDescription
datasetIdstringYesId of the dataset
rowIdsstring[]YesIds of the rows to delete (from get-dataset), 1–300

Response

FieldTypeDescription
successbooleanWhether the deletion succeeded
datasetIdstringThe dataset id
deletednumberNumber of rows actually deleted
messagestringConfirmation message

Example

{
"tool": "delete-dataset-rows",
"arguments": {
"datasetId": "<dataset id>",
"rowIds": ["<row id 1>", "<row id 2>"]
}
}

update-dataset

Update a dataset's name and/or column schema.

Parameters

ParameterTypeRequiredDescription
datasetIdstringYesId of the dataset
namestringNoNew dataset name
columnsarrayNoNew full column schema (replaces the existing columns)
columns[].idstringNoExisting column id to preserve its cells; omit to add a new column
columns[].namestringYesColumn header / field name
columns[].typestringNotext (default), image, video, boolean, select

At least one of name or columns must be provided. When sending columns, include every column you want to keep. Columns not present are removed. Pass an existing column's id so its row data stays aligned.

Response

FieldTypeDescription
successbooleanWhether the dataset was updated
dataset.idstringDataset id
dataset.namestringName
dataset.rowCountnumberRow count
dataset.columnsarrayThe resolved column schema
messagestringConfirmation message

Example

{
"tool": "update-dataset",
"arguments": {
"datasetId": "<dataset id>",
"name": "Summer Products 2026"
}
}

delete-dataset

Soft-delete a dataset. Designs already bound to it keep their resolved data, but the dataset no longer appears in the library.

Parameters

ParameterTypeRequiredDescription
datasetIdstringYesId of the dataset to delete

Response

FieldTypeDescription
successbooleanWhether the dataset was deleted
datasetIdstringThe dataset id
messagestringConfirmation message

Example

{
"tool": "delete-dataset",
"arguments": { "datasetId": "<dataset id>" }
}