Publish several cards at once
upsert_cards_batchCreate or replace up to 32 cards in one call. Always prefer this over repeated upsert_card when one snapshot produces several related cards: it makes a single widget-reload decision instead of burning WidgetKit's daily reload budget once per card. Set replacePrefix to your own id namespace and the snapshot also deletes what it no longer contains, which is the only way to stop reporting something without leaving a dead card behind.
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": {
"cards": "<cards>"
},
"name": "upsert_cards_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cards | Yes | Every card from one producer snapshot, sent together. Ids must be unique within the batch. This is one coalesced widget-reload decision instead of one per card, which is why it is preferred over looping the single-card endpoint. | |
| replacePrefix | No | Delete this tenant's cards whose id starts with this prefix and that are absent from `cards`. Use the namespace you already publish under ("myapp-"), so one producer's snapshot can never remove another's cards. Every card in the batch must start with it, which is what stops a typo from deleting everything. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cards | Yes | ||
| removed | No | Ids deleted because they were under `replacePrefix` and absent from this snapshot. Present only when `replacePrefix` was sent. |