Insert Table Row
insert_table_row · Tools · Tables
Add schema-valid rows. id can be supplied or autogenerated from id_format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Row data as JSON text. Supply a single object or an array of objects. Fields must match the current table schema. `id` can be supplied, including ids from external resources such as Discord messages or Notion documents. If omitted, id is autogenerated from id_format: string uses ULID, number uses a sequential id. Duplicate `id` fails. |
table_id | string | Yes | The table's id or slug, as list_tables or create_table gives them; the slug aliases the id and either is accepted. |
Insert Table Row Tool#
Insert one or more schema-valid rows into a Feather table.
When to Use#
Use this tool to add data to an existing table after the table schema is known. The row object must match the current schema: unknown fields and wrong JSON types are rejected.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
table_id |
string | Yes | The table's id or slug, as list_tables gives them; the slug aliases the id and either is accepted |
data |
object | array | Yes | Single row object or array of row objects matching the table schema. Include id to choose the row ID; omit it to generate one. |
Returns#
For single row insertion:
| Field | Type | Description |
|---|---|---|
success |
boolean | Whether the insertion succeeded |
row_id |
string | number | Inserted row ID; type follows table id_format |
table_id |
string | The table identifier |
For batch insertion:
| Field | Type | Description |
|---|---|---|
success |
boolean | Whether all insertions succeeded |
row_ids |
array | Inserted row IDs |
table_id |
string | The table identifier |
count |
number | Number of rows inserted |
Example#
{
"table_id": "customers",
"data": {
"name": "Acme Corp",
"email": "contact@acme.com",
"plan": "enterprise"
}
}
Notes#
- Row writes do not modify schema.
- Unknown fields are rejected.
- Values must match declared column types.
- Supplied
idis used exactly. Duplicateidfails. - If
idis omitted, string-ID tables use ULID and numeric-ID tables use a sequential ID. - String row IDs are suitable for external IDs and compound keys, such as Discord message IDs, Notion document IDs, or webhook IDs.
- Create or modify the schema before inserting new fields.
- Empty-schema tables cannot accept user fields until schema is added or inferred by JSON import.