cosmosdb_upsert_item
Insert or replace an item in a Cosmos DB container. The item's id and partition key determine whether to create or update.
Instructions
Insert or replace an item in a Cosmos DB container.
The item must include an 'id' field. If an item with the same id and partition key already exists it will be replaced; otherwise a new item is created. Returns the stored item document (including system fields) as JSON.
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": {
"account": "<account>",
"database": "<database>",
"container": "<container>",
"item": "<item>"
},
"name": "cosmosdb_upsert_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | ||
| database | Yes | ||
| container | Yes | ||
| item | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |