Skip to main content
Glama

cosmosdb_container_describe

Retrieve configuration details and properties for a Cosmos DB container to understand its structure and settings.

Instructions

Get details about a Cosmos DB container

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
container_nameYesName of the Cosmos DB container
database_nameNoName of the Cosmos DB database (optional, defaults to 'defaultdb')

Implementation Reference

  • Handler logic for the cosmosdb_container_describe tool: retrieves the container client and reads its properties.
    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
  • Schema definition for the cosmosdb_container_describe tool, including input parameters like container_name 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"],
        },
    ),
  • Registration of tools via list_tools handler, which returns get_azure_tools() including the cosmosdb_container_describe tool.
    async def list_tools() -> list[Tool]:
        """List available Azure tools"""
        logger.debug("Handling list_tools request")
        return get_azure_tools()  # Use get_azure_tools
  • The get_cosmosdb_tools function returns a list of Tool objects including the cosmosdb_container_describe tool, which is aggregated into get_azure_tools() for registration.
    def get_cosmosdb_tools() -> list[Tool]:
        return [
            Tool(
                name="cosmosdb_container_create",  # Renamed from table to container
                description="Create a new 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')",
                        },
                        "partition_key": {
                            "type": "object",
                            "description": "Partition key definition for the container (e.g., {'paths': ['/partitionKey'], 'kind': 'Hash'})",
                        },
                    },
                    "required": [
                        "container_name",
                        "partition_key",
                    ],  # Partition key is usually required for Cosmos DB
                },
            ),
            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"],
                },
            ),
            Tool(
                name="cosmosdb_container_list",  # Renamed from table to container
                description="List all Cosmos DB containers in a database",  # Updated description
                inputSchema={
                    "type": "object",
                    "properties": {
                        "database_name": {
                            "type": "string",
                            "description": "Name of the Cosmos DB database (optional, defaults to 'defaultdb')",
                        }
                    },
                },
            ),
            Tool(
                name="cosmosdb_container_delete",  # Renamed from table to container
                description="Delete 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"],
                },
            ),
            Tool(
                name="cosmosdb_item_create",  # Renamed from put to create, and table to container
                description="Create a new item in 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')",
                        },
                        "item": {
                            "type": "object",
                            "description": "Item data to create (JSON object)",
                        },
                    },
                    "required": ["container_name", "item"],
                },
            ),
            Tool(
                name="cosmosdb_item_read",  # Renamed from get to read, and table to container
                description="Read an item from 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')",
                        },
                        "item_id": {
                            "type": "string",
                            "description": "ID of the item to read",
                        },
                        "partition_key": {
                            "type": "string",
                            "description": "Partition key value for the item",
                        },
                    },
                    "required": ["container_name", "item_id", "partition_key"],
                },
            ),
            Tool(
                name="cosmosdb_item_replace",  # Renamed from update to replace, and table to container, using replace_item for full replace
                description="Replace an item in 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')",
                        },
                        "item_id": {
                            "type": "string",
                            "description": "ID of the item to replace",
                        },
                        "partition_key": {
                            "type": "string",
                            "description": "Partition key value for the item",
                        },
                        "item": {
                            "type": "object",
                            "description": "Updated item data (JSON object)",
                        },
                    },
                    "required": ["container_name", "item_id", "partition_key", "item"],
                },
            ),
            Tool(
                name="cosmosdb_item_delete",  # Renamed table to container
                description="Delete an item from 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')",
                        },
                        "item_id": {
                            "type": "string",
                            "description": "ID of the item to delete",
                        },
                        "partition_key": {
                            "type": "string",
                            "description": "Partition key value for the item",
                        },
                    },
                    "required": ["container_name", "item_id", "partition_key"],
                },
            ),
            Tool(
                name="cosmosdb_item_query",  # Renamed table to container, simplified query
                description="Query items in a Cosmos DB container using SQL",  # 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')",
                        },
                        "query": {
                            "type": "string",
                            "description": "Cosmos DB SQL query string",
                        },
                        "parameters": {
                            "type": "array",
                            "description": "Parameters for the SQL query (optional)",
                            "items": {
                                "type": "object",
                                "properties": {
                                    "name": {"type": "string"},
                                    "value": {},  # Value can be any type
                                },
                            },
                        },
                    },
                    "required": ["container_name", "query"],
                },
            ),
        ]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get details'), but doesn't specify whether it's safe, if it requires specific permissions, what happens on errors (e.g., if the container doesn't exist), or any rate limits. For a tool with zero annotation coverage, this lack of behavioral context is a significant gap, though it doesn't contradict any annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is front-loaded and appropriately sized for a simple read operation, making it easy for an agent to parse quickly. Every word earns its place by conveying essential information concisely.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (a read operation with two parameters) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it lacks details on behavioral traits (e.g., error handling) and return values (e.g., what details are included). This leaves gaps that could hinder an agent's ability to use the tool effectively, though it meets the basic requirement for a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, fully documenting both parameters (container_name and database_name) with their types and optionality. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. According to the rules, with high schema coverage (>80%), the baseline is 3, which is appropriate here as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get details about') and resource ('a Cosmos DB container'), making the purpose immediately understandable. It distinguishes from siblings like cosmosdb_container_create, cosmosdb_container_delete, and cosmosdb_container_list by specifying it retrieves details rather than creating, deleting, or listing containers. However, it doesn't specify what details are included (e.g., properties, settings, or metadata), which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over cosmosdb_container_list for listing containers or cosmosdb_item_read for reading items within a container, nor does it specify prerequisites like authentication or required permissions. The absence of usage context leaves the agent without direction on appropriate tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mashriram/azure_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server