Skip to main content
Glama

blob_delete

Remove a specific blob from Azure Blob Storage by specifying the container and blob name, ensuring efficient storage management and data cleanup.

Instructions

Delete a blob from Blob Storage

Input Schema

NameRequiredDescriptionDefault
blob_nameYesName of the blob to delete
container_nameYesName of the Blob Storage container

Input Schema (JSON Schema)

{ "properties": { "blob_name": { "description": "Name of the blob to delete", "type": "string" }, "container_name": { "description": "Name of the Blob Storage container", "type": "string" } }, "required": [ "container_name", "blob_name" ], "type": "object" }

Implementation Reference

  • Executes the deletion of a specific blob from Azure Blob Storage using the BlobServiceClient. Gets the blob client and calls delete_blob().
    elif name == "blob_delete": blob_client = blob_service_client.get_blob_client( container=arguments["container_name"], blob=arguments["blob_name"] ) blob_client.delete_blob() response = {"blob_name": arguments["blob_name"], "deleted": True}
  • Defines the Tool object for blob_delete, including name, description, and inputSchema requiring container_name and blob_name.
    Tool( name="blob_delete", description="Delete a blob from Blob Storage", inputSchema={ "type": "object", "properties": { "container_name": { "type": "string", "description": "Name of the Blob Storage container", }, "blob_name": { "type": "string", "description": "Name of the blob to delete", }, }, "required": ["container_name", "blob_name"], }, ),
  • Registers the blob_delete tool by including it in the list returned by get_blob_storage_tools(), which is used by get_azure_tools() and server.list_tools().
    def get_blob_storage_tools() -> list[Tool]: return [ Tool( name="blob_container_create", description="Create a new Blob Storage container", inputSchema={ "type": "object", "properties": { "container_name": { "type": "string", "description": "Name of the Blob Storage container to create", } }, "required": ["container_name"], }, ), Tool( name="blob_container_list", description="List all Blob Storage containers", inputSchema={"type": "object", "properties": {}}, ), Tool( name="blob_container_delete", description="Delete a Blob Storage container", inputSchema={ "type": "object", "properties": { "container_name": { "type": "string", "description": "Name of the Blob Storage container to delete", } }, "required": ["container_name"], }, ), Tool( name="blob_upload", description="Upload a blob to Blob Storage", inputSchema={ "type": "object", "properties": { "container_name": { "type": "string", "description": "Name of the Blob Storage container", }, "blob_name": { "type": "string", "description": "Name of the blob in the container", }, "file_content": { "type": "string", "description": "Base64 encoded file content for upload", }, }, "required": ["container_name", "blob_name", "file_content"], }, ), Tool( name="blob_delete", description="Delete a blob from Blob Storage", inputSchema={ "type": "object", "properties": { "container_name": { "type": "string", "description": "Name of the Blob Storage container", }, "blob_name": { "type": "string", "description": "Name of the blob to delete", }, }, "required": ["container_name", "blob_name"], }, ), Tool( name="blob_list", description="List blobs in a Blob Storage container", inputSchema={ "type": "object", "properties": { "container_name": { "type": "string", "description": "Name of the Blob Storage container", } }, "required": ["container_name"], }, ), Tool( name="blob_read", description="Read a blob's content from Blob Storage", inputSchema={ "type": "object", "properties": { "container_name": { "type": "string", "description": "Name of the Blob Storage container", }, "blob_name": { "type": "string", "description": "Name of the blob to read", }, }, "required": ["container_name", "blob_name"], }, ), ]
  • MCP server registration of tools via list_tools handler, which returns all Azure tools including blob_delete.
    async def list_tools() -> list[Tool]: """List available Azure tools""" logger.debug("Handling list_tools request") return get_azure_tools() # Use get_azure_tools
  • Dispatches blob_delete calls (names starting with 'blob_') to the blob storage operations handler.
    if name.startswith("blob_"): # Updated prefix to blob_ return await handle_blob_storage_operations( azure_rm, name, arguments ) # Use blob handler elif name.startswith("cosmosdb_"): # Updated prefix to cosmosdb_

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