Upsert Record
upsert_recordCreate a new record in a pane collection or retrieve an existing one using a stable key, enabling deduplication for items like todos or comments.
Instructions
Create a row in a pane's record collection, or return the existing row if record_key is already present (deduped:true). Use to add a todo, a line item, a comment, etc. The collection must be declared in the pane's record schema with 'agent' allowed to write. If you're still designing the pane, call get_skill first for the records-vs-events decision and the x-pane-collections schema grammar. Returns { record, deduped }.
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": {
"pane_id": "<pane_id>",
"collection": "<collection>",
"data": "<data>"
},
"name": "upsert_record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The record body — any JSON value valid against the collection schema. | |
| pane_id | Yes | The pane id. | |
| collection | Yes | The record collection name. | |
| record_key | No | Optional stable key. Reusing an existing key returns the existing row (deduped:true). |