cosmosdb_container_describe
Retrieve comprehensive details about a specific Cosmos DB container, including configuration and metadata, by specifying the container name and optional database name.
Instructions
Get details about a Cosmos DB container
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| container_name | Yes | Name of the Cosmos DB container | |
| database_name | No | Name of the Cosmos DB database (optional, defaults to 'defaultdb') |
Input Schema (JSON Schema)
{
"properties": {
"container_name": {
"description": "Name of the Cosmos DB container",
"type": "string"
},
"database_name": {
"description": "Name of the Cosmos DB database (optional, defaults to 'defaultdb')",
"type": "string"
}
},
"required": [
"container_name"
],
"type": "object"
}
Implementation Reference
- mcp_server_azure/azure_server.py:255-259 (handler)Executes the cosmosdb_container_describe tool by getting the container client and reading its properties to return details.elif name == "cosmosdb_container_describe": # Renamed from table to container container = database.get_container_client(arguments["container_name"]) container_properties = container.read() response = container_properties elif name == "cosmosdb_container_list": # Renamed from table to container
- Defines the Tool schema for cosmosdb_container_describe, including input validation schema with container_name (required) and optional database_name.Tool( name="cosmosdb_container_describe", # Renamed from table to container description="Get details about a Cosmos DB container", # Updated description inputSchema={ "type": "object", "properties": { "container_name": { # Renamed from table_name "type": "string", "description": "Name of the Cosmos DB container", # Updated description }, "database_name": { "type": "string", "description": "Name of the Cosmos DB database (optional, defaults to 'defaultdb')", }, }, "required": ["container_name"], },
- mcp_server_azure/azure_server.py:171-175 (registration)Registers the cosmosdb_container_describe tool (among others) by returning get_azure_tools() in the MCP server's list_tools handler.@server.list_tools() async def list_tools() -> list[Tool]: """List available Azure tools""" logger.debug("Handling list_tools request") return get_azure_tools() # Use get_azure_tools
- mcp_server_azure/azure_tools.py:396-401 (registration)Includes cosmosdb_container_describe via get_cosmosdb_tools() in the full list of Azure tools.def get_azure_tools() -> list[Tool]: return [ *get_blob_storage_tools(), *get_cosmosdb_tools(), *get_app_configuration_tools() ]