propose_edits
Submit row inserts, updates and deletes as pending edits in the table's data viewer for user review, save or discard; nothing is written until approved.
Instructions
Proposes rows to change in a table: PlatypusDB opens the table's data viewer with them as pending edits (new rows, changed cells, rows marked for deletion) that the user reviews, saves or discards (now if the app is open, else when it starts). Nothing is written here, whatever the connection's agent access. inserts: objects of column to value. updates: {key, set}, key naming a row by exactly the columns of a primary or unique key. deletes: objects naming rows by such a key. A value is a string, number, boolean or null (no arrays or objects); at most 500 rows and 1 MiB in all. The table needs a primary or unique key. On MongoDB the table is a collection (not a view) and the key is _id alone, read by the type of the collection's _id: an ObjectId as its 24 hex digits. Redis, Elasticsearch and Cassandra, read-only connections and those that forbid editing data are refused. title names the tab.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"connection": "<connection>",
"schema": "<schema>",
"table": "<table>"
},
"name": "propose_edits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | The table (a collection in MongoDB). | |
| title | No | The data viewer tab's title, e.g. what the changes do. | |
| schema | Yes | The table's schema (a database in MySQL and MongoDB, `main` in SQLite and DuckDB). | |
| deletes | No | Rows to delete: each names a row by exactly the columns of a primary or unique key (`_id` alone in MongoDB, as for `updates`). | |
| inserts | No | Rows to insert: each an object of column to value. A value is a string, number, boolean or null; columns left out take their default. | |
| updates | No | Rows to change: `key` names a row by exactly the columns of a primary or unique key of the table, `set` gives the new values of other columns (or the same). In MongoDB the key is `_id` alone, read by the type of the collection's `_id`: an `ObjectId` as its 24 hexadecimal digits (`{"_id": "65a1b2c3d4e5f60718293a4b"}`), a number as a number. | |
| connection | Yes | The connection's name, as `list_connections` shows it. |