Table Tools
table_tools · Nodes · AI
Makes one table's rows available to AI steps as scoped tools.
Table Tools#
Gives an AI node scoped tools over exactly one table.
- Category: AI
- Input: required
input - Output:
tools— wire it into an AI Agenttoolsinput
The node performs no table work during workflow execution. It emits concretely-named AgentTool
configs; the agent calls them later.
Configuration#
| Field | Description |
|---|---|
table |
The table slug or ULID these tools may reach. They can reach no other. |
tool_name |
Optional AI-visible name prefix. Defaults to the table's name in snake_case. |
query |
Enable {prefix}_query: filter, sort, and page rows. On by default. |
get |
Enable {prefix}_get: read one row by id. On by default. |
add |
Enable {prefix}_add: add one row. On by default. |
update |
Enable {prefix}_update: change columns of one row. On by default. |
remove |
Enable {prefix}_remove: delete one row. Off by default. |
A table named Reading List produces reading_list_query, reading_list_get, reading_list_add,
reading_list_update, and reading_list_remove. The parameter schema of each is generated from the
table's declared columns, so the agent sees the real columns inline: a select column arrives as an
enum, a list as a typed array, an object as a closed shape.
One node targets one table. A second table is a second node — the tool names differ, so both nodes can feed the same AI node.
Set tool_name when the derived prefix collides with another node's, or when the table's name does
not make a usable tool name. Every generated name must be ASCII letters, numbers, underscores, or
hyphens, and at most 64 characters; the node reports a name it cannot generate when the workflow is
built, rather than failing mid-conversation.
Scope is the point of this node. If the agent should reach tables it was not pointed at, use the table management tools instead.
Tool Call Contracts#
{prefix}_query takes optional filters, search, sort, limit, and offset.
{
"filters": [{ "target": "status", "operator": "eq", "operand": "reading" }],
"sort": { "target": "added_at", "direction": "desc" },
"limit": 25,
"offset": 0
}
Filter operators are eq, neq, gt, gte, lt, lte, contains, is_null, is_not_null,
includes, includes_any, in, and not_in. contains is a substring of text; includes is
membership of a list or object column, and includes_any matches any listed element. in and
not_in test a single-valued column against a set, and take a non-empty array.
Targets are column names, or id for the row id. Multiple filters combine with AND.
search is a ranked free-text match — { "term", "targets" }, where targets are column names and
null searches the text columns. Use search to find a row by wording, filters for an exact match;
the two combine in one call.
The page defaults to 25 rows and is at most 1000; an over-large page is refused rather than clamped.
Every read publishes a row under the state it is in: a valid row is { "valid": { … } }, the row as
an object of its columns with id among them. Rows that do not satisfy the table's declared columns
come back in place as { "broken": { "id", "reason", "raw" } }, so a count taken from a read stays
honest. total counts them too.
{prefix}_get and {prefix}_remove take id.
{ "id": "01J00000000000000000000000" }
{prefix}_add takes the table's declared columns.
{ "title": "Piranesi", "author": "Susanna Clarke", "status": "unread" }
{prefix}_update takes id and the columns to change. Omit a column to leave it alone; send null
to empty it.
{ "id": "01J00000000000000000000000", "status": "finished" }
Both writes are strict: a value that violates the declaration is rejected rather than stored, so
these tools never create a broken row. A block column is written as markdown and stored as a block
document. A key the table does not declare is refused.
A table that denies AI read or write refuses these tools for that operation.
Inputs
inputRequired
Outputs
tools
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
table | table_ref | Yes | The table these tools may reach. They can reach no other. |
tool_name | string | Yes | Optional AI-visible name prefix. Defaults to the table's name in snake_case; enabled operations become {prefix}_query, {prefix}_get, {prefix}_add, {prefix}_update, and {prefix}_remove. |
query | boolean | No | Enable {prefix}_query: filter, sort, and page rows. |
get | boolean | No | Enable {prefix}_get: read one row by id. |
add | boolean | No | Enable {prefix}_add: add one row. |
update | boolean | No | Enable {prefix}_update: change columns of one row. |
remove | boolean | No | Enable {prefix}_remove: delete one row. |
base_config | record | No | Shared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow). |