cosmosdb_read_item
Retrieve a single item from Azure Cosmos DB by providing the item ID and partition key. Returns the item document as JSON for efficient point reads.
Instructions
Read a single item from a Cosmos DB container by ID and partition key.
Returns the full item document as JSON. Both item_id and partition_key are required — Cosmos DB requires the partition key for efficient point reads.
key_env_var: name of the environment variable holding the Cosmos DB account key. If the variable is set, key-based auth is used; otherwise DefaultAzureCredential is used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | ||
| database | Yes | ||
| container | Yes | ||
| item_id | Yes | ||
| partition_key | Yes | ||
| key_env_var | No | AZURE_COSMOS_KEY |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |