mcp_upsert_document
Insert a new document or update an existing one in a CosmosDB container by specifying the container, document data, and partition key.
Instructions
Create or update a document in a CosmosDB container (upsert operation).
If a document with the same id and partition key exists, it will be replaced. If it doesn't exist, a new document will be created.
Example: mcp_upsert_document({ container_id: 'users', document: {id: 'user-456', email: 'test@example.com', lastUpdated: '2024-01-15'}, partition_key: 'user-456', connection_id: 'athlete' })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| container_id | Yes | The ID/name of the container | |
| document | Yes | The document to create or update. Must include 'id' field and the partition key field. | |
| partition_key | Yes | The partition key value for the document | |
| connection_id | No | ID of the connection to use. Use mcp_list_connections to see available connections. If not specified, uses the default connection. |