Tables

Space MCP tools in the Tables scope (tables). Reach these with a wks_live_ key over space-mcp or space-api.

Tools in the tables scope, callable over space-mcp (tools/call) or space-api (REST) with a wks_live_* key that grants tables.

add_row_comment

Scope: tables:write

Add a comment to a table row's discussion thread (posted as the agent). Tag people, agents or anything in the space with @ — write the mention find_to_mention gives ("@Julie [member:…]"): a person tagged is notified, an agent tagged is told in its chat.

ParameterTypeRequiredDescription
table_idstringyes
row_idstringyes
bodystringyes

create_table

Scope: tables:write

Create a new table. Pass name (plural label, e.g. 'Invoices') and optionally columns to define the schema in one call — same shape as create_table_column args ({key,label,type,...}). Slug is auto-generated and de-duplicated. The first text column becomes the row title unless title_field_key is set.

ParameterTypeRequiredDescription
namestringyesPlural label, e.g. 'Invoices'.
singular_labelstringDefaults to name.
slugstring
iconstringLucide icon name or emoji.
colorstring
descriptionstring
title_field_keystring
columnsobject[]Initial columns: [{key,label,type,options?,reference_target?,field_config?,required?,default_value?,icon?}].

create_table_column

Scope: tables:write

Add a column to a table. key must be snake_case (^[a-z][a-z0-9_]*$). All field types are supported (text, number, select, rating, attachment, formula, lookup, rollup, ...). For select/multi_select pass options:[{value,label,color?}]; for a column people fill by picking a contact/task/event/row, use type 'reference' with reference_target:{kind:'contact'|'task'|'calendar_event'} or {kind:'table',table_id} (a table of this space) — required; for formula/lookup/rollup/button/currency-style config pass field_config (formula: {expression}, lookup: {source_column_key,target_column_key}, rollup: {source_column_key,target_column_key,aggregator}).

ParameterTypeRequiredDescription
table_idstringyes
keystringyessnake_case column key, e.g. 'vin'.
labelstringyes
typetext | long_text | number | boolean | date | time | url | email | phone | select | multi_select | rating | member | json | reference | created_time | last_edited_time | created_by | last_edited_by | autonumber | attachment | duration | rich_text | geolocation | button | document | formula | lookup | rollupyes
descriptionstring
optionsarrayselect/multi_select choices: [{value,label,color?}].
reference_targetobjectreference target: {kind:'contact'} or {kind:'table',table_id}.
field_configobjectType-specific config (formula expression, lookup/rollup source, button action, number format, ...).
requiredboolean
uniquebooleanNo duplicates: refuse a second row with the same value (text, long_text, email, phone, url, number; case/space-blind, phones by digits). Turning it on over existing duplicates is refused, naming one.
default_value—
display_ordernumber
iconstringOptional emoji shown in the column header.

create_table_row

Scope: tables:write

Create a row in a table. Pass column values in data (column key → value). Link cells take what you know: a contact column its contact's id, email, phone or exact name; a task/event column its id or exact title; a table-link column the linked row's id or exact title; a member column a user id (list_space_members). null clears. A select cell takes an option's value or label. A value that names nothing in this space is refused by name.

ParameterTypeRequiredDescription
table_idstringyes
dataobjectyesMap of column key → value.

create_table_rows

Scope: tables:write

Bulk-insert up to 100 rows into a table in one call. rows is an array of data objects (column key → value). Link cells take ids, emails, phones or exact titles, as in create_table_row.

ParameterTypeRequiredDescription
table_idstringyes
rowsobject[]yes

Scope: tables:write

Create a PUBLIC view-only share link for a table. Anyone with the URL sees a read-only rendering of the given view (its filters and hidden fields are enforced server-side). Omit view_id to share the table's default view. Returns the shareable URL.

ParameterTypeRequiredDescription
table_idstringyes
view_idstringShare this specific view. Defaults to the table's default view.
namestringLabel shown in the share-links list.

create_table_snapshot

Scope: tables:write

Capture a named save point of a table's full state (schema + rows + views). Do this before risky bulk edits so the user can restore.

ParameterTypeRequiredDescription
table_idstringyes
labelstring

create_table_view

Scope: tables:write

Create a view for a table. type: grid | kanban | calendar. config holds the per-view filters/sort/group/hidden fields (kanban needs config.group_by, calendar needs config.date_field). To show a table any other way — cards with photos, charts, a feed, a map — build an app over the table (create_app, wakato.tables.* reads and writes it live); there are no gallery or dashboard views.

ParameterTypeRequiredDescription
table_idstringyes
namestringyes
typegrid | kanban | calendarDefaults to grid.
configobjectPer-view filters/sort/grouping/layout settings.
display_ordernumber
is_defaultbooleanMake this the table's default view (clears any prior default).

decide_table_access_request

Scope: tables:write

Answer someone who asked to use a table (get_table_access lists requests): accept lets them in at level (default read), false says not now. They are told either way. Always asks the owner first.

ParameterTypeRequiredDescription
table_idstringyes
request_idstringyes
acceptbooleanyes
levelread | edit | fill | change

delete_table

Scope: tables:write

Delete a table. Default is ARCHIVE (reversible via update_table {archived:false}). Pass hard_delete:true to permanently delete the table and all its rows/columns/views — a safety snapshot is captured first.

ParameterTypeRequiredDescription
table_idstringyes
hard_deleteboolean

delete_table_column

Scope: tables:write

Delete a table column (drops its data from all rows).

ParameterTypeRequiredDescription
column_idstringyes

delete_table_row

Scope: tables:write

Delete one row from a table. Irreversible (but the table History keeps a before-state).

ParameterTypeRequiredDescription
table_idstringyes
row_idstringyes

delete_table_rows

Scope: tables:write

Bulk-delete up to 100 rows by id in one call.

ParameterTypeRequiredDescription
table_idstringyes
row_idsstring[]yes

delete_table_view

Scope: tables:write

Delete a table view.

ParameterTypeRequiredDescription
view_idstringyes

get_table

Scope: tables:read

Get one table's full definition: metadata, columns (schema), views, and row count. Call this before reading/writing rows so you know the column keys and types.

ParameterTypeRequiredDescription
table_idstringyes

get_table_access

Scope: tables:write

Who can use a table and how far — the table's “Who can use it”: every person in the space with their level (No access · Read · Edit what's in it · Add & remove rows · Change the table), whether they're kept to their own rows, columns hidden from them and WHERE it comes from (their own line, a team, Everyone else, their Tables permission); the space's teams with their lines; Everyone else; whose row is it; pending requests to get in. People, not agents — an agent's reach is its Can use.

ParameterTypeRequiredDescription
table_idstringyes

get_table_history

Scope: tables:read

What changed in a table, by whom and when — the table's History: sessions newest first (who, summary, how many edits, its restore point). With session_id: that session's edits, each row edit listing the fields it changed (before → after). To undo, restore_table_snapshot the restore point of the session before the change.

ParameterTypeRequiredDescription
table_idstringyes
session_idstringOne session's edits (from a previous call).
limitnumber

get_table_view

Scope: tables:read

Get one table view including its full config (filters, sort, grouping, layout settings).

ParameterTypeRequiredDescription
view_idstringyes

list_row_comments

Scope: tables:read

List the comment thread on a table row (oldest first).

ParameterTypeRequiredDescription
table_idstringyes
row_idstringyes
limitnumber

list_table_columns

Scope: tables:read

List a table's columns (its schema). Needed before creating rows so you know the column keys/types.

ParameterTypeRequiredDescription
table_idstringyes

list_table_rows

Scope: tables:read

List/query rows of a table with optional filters (AND-combined, ops: eq|neq|contains|gt|lt|is_empty|is_not_empty on column keys), multi-column sort, and search (substring match on the title column, or search_column). Returns rows plus total/has_more for pagination.

ParameterTypeRequiredDescription
table_idstringyes
limitnumber
offsetnumber
filtersobject[][{column_key, op, value?}] — AND-combined.
sortobject[][{column_key, direction:'asc'|'desc'}] — also accepts created_at/updated_at.
searchstring
search_columnstring

Scope: tables:read

List a table's public view-only share links (URL, view, revoked state).

ParameterTypeRequiredDescription
table_idstringyes

list_table_snapshots

Scope: tables:read

List a table's Time Machine snapshots (save points + auto-captured session snapshots), newest first.

ParameterTypeRequiredDescription
table_idstringyes
limitnumber

list_table_views

Scope: tables:read

List the saved views (grid/kanban/calendar) of a table. Per-view filters/sort/group live in each view's config.

ParameterTypeRequiredDescription
table_idstringyes

list_tables

Scope: tables:read

List user-defined tables (record types) in the space.

restore_table_snapshot

Scope: tables:write

Restore a table to a snapshot's state (schema + rows + views). Atomic; a pre-restore snapshot is captured automatically so this is reversible.

ParameterTypeRequiredDescription
snapshot_idstringyes

Scope: tables:write

Revoke a public share link — the URL stops working immediately.

ParameterTypeRequiredDescription
link_idstringyes

set_table_access

Scope: tables:write

Set what a PERSON, a TEAM, or everyone else in the space may do on a table — one line: user_id, team_id or everyone:true. level: none · read · edit (what's in the rows) · fill (add & remove rows) · change (the table itself), or null to take the line away (they fall back to their team / Everyone else / Tables permission). own_rows keeps them to rows they added or that the table's person column names (set_table_own_rows_column). hidden_columns: columns they never see or write. The space's owner and admins always have everything. Everyone whose access changes is told. Always asks the owner first.

ParameterTypeRequiredDescription
table_idstringyes
user_idstringA person in the space (list_space_members).
team_idstringA team of the space (list_teams).
everyonebooleanEveryone else in the space — anyone without their own or a team's line.
levelnone | read | edit | fill | change | null
own_rowsboolean
hidden_columnsstring[]Column keys hidden from them.

set_table_own_rows_column

Scope: tables:write

Whose row is it, for people kept to their own rows: the rows they added, plus — when a person (member) column is named here — the rows where that column names them. column_key null = only who added it.

ParameterTypeRequiredDescription
table_idstringyes
column_keystring,nullA member column's key, or null.

set_table_web_publishing

Scope: tables:write

Let web pages show a table's rows — or take it off the web. A page shows a table (<div data-wakato-table="<id>">) only when the table is published, only the columns listed here, at most max_rows. Always asks the owner first: it puts the table's contents on public pages. published:false empties every page using it from the next view.

ParameterTypeRequiredDescription
table_idstringyes
publishedbooleanyes
visible_columnsstring[]Column keys a visitor may see — the only ones sent to a page. Required the first time it is published.
max_rowsnumberThe most rows any page receives (default 100).

table_totals

Scope: tables:read

Totals of a table, computed exactly in the database whatever its size: count rows, sum / average / min / max a number column, count distinct values — for the whole table, or grouped by a column (e.g. per Status, per customer) or by day / week / month / quarter / year of a date column, with filters. Use this to answer how much, how many, per what, per month — never page through rows to add them up yourself. Name columns by key or label. metrics: "count", "sum:Order Amount", "avg:Order Amount", or [{op, column, as?}]. filters: [{column, op, value}] (eq|neq|gt|gte|lt|lte|contains|is_empty|is_not_empty) or {column: value}; a select filter takes the option's label, a link filter an email / name / title. Groups come back biggest first (order:"key" for in order), each with key, a readable label, and the metrics.

ParameterTypeRequiredDescription
table_idstringyes
metrics—What to total: "count" (default), "sum:<column>", "avg:<column>", "min:<column>", "max:<column>", "count_distinct:<column>", or [{op, column, as?}] — up to 10.
group_bystringColumn (key or label) to break the totals down by; created_at / updated_at too.
buckethour | day | week | month | quarter | yearWith a date column in group_by: one group per period.
filters—[{column, op, value}] AND-combined, or {column: value}.
ordervalue | keyvalue = biggest first (default); key = in order (a time series).
limitnumberMost groups to return (default 100, max 1000).

update_table

Scope: tables:write

Edit table metadata: labels, slug, icon, color, description, title_field_key, display_order. Pass archived:true to archive (hide) the table, archived:false to restore it.

ParameterTypeRequiredDescription
table_idstringyes
namestringAlias for plural_label.
singular_labelstring
plural_labelstring
slugstring
iconstring
colorstring
descriptionstring
title_field_keystring
display_ordernumber
archivedboolean

update_table_column

Scope: tables:write

Edit a table column (label, type, options, required, no duplicates, etc.).

ParameterTypeRequiredDescription
column_idstringyes
keystring
labelstring
typetext | long_text | number | boolean | date | time | url | email | phone | select | multi_select | rating | member | json | reference | created_time | last_edited_time | created_by | last_edited_by | autonumber | attachment | duration | rich_text | geolocation | button | document | formula | lookup | rollup
descriptionstring
optionsarray
reference_targetobject
field_configobject
requiredboolean
uniquebooleanNo duplicates (see create_table_column).
default_value—
display_ordernumber
iconstring

update_table_row

Scope: tables:write

Patch a row's data (merged into existing JSON, not replaced). Link cells take ids, emails, phones or exact titles, as in create_table_row.

ParameterTypeRequiredDescription
table_idstringyes
row_idstringyes
dataobjectyes

update_table_rows

Scope: tables:write

Bulk-patch up to 100 rows in one call. updates = [{row_id, data}] — each data object is merged into that row. Per-row failures are reported, not fatal.

ParameterTypeRequiredDescription
table_idstringyes
updatesobject[]yes

update_table_view

Scope: tables:write

Edit a table view (name, type, config, order, or default flag).

ParameterTypeRequiredDescription
view_idstringyes
namestring
typegrid | kanban | calendar
configobject
display_ordernumber
is_defaultboolean

On this page