Skip to main content
Glama

cosmosdb_container_delete

Delete a Cosmos DB container by specifying its name and optional database. Ensures automatic logging and audit tracking of the deletion process.

Instructions

Delete a Cosmos DB container

Input Schema

NameRequiredDescriptionDefault
container_nameYesName of the Cosmos DB container
database_nameNoName 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

  • Executes the deletion of the specified Cosmos DB container using the Azure Cosmos DB client's database.delete_container method and sets a success response.
    elif name == "cosmosdb_container_delete": # Renamed from table to container database.delete_container(arguments["container_name"]) response = {"container_name": arguments["container_name"], "deleted": True}
  • Defines the tool's metadata, description, and input schema which validates the required 'container_name' and optional 'database_name' parameters.
    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"], }, ),
  • MCP server registration point that lists all available tools by calling get_azure_tools(), which includes the cosmosdb_container_delete tool.
    @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

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