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.
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_id": "<item_id>",
"partition_key": "<partition_key>"
},
"name": "cosmosdb_read_item"
}
}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 |