Skip to main content
Glama
RadiumGu

Alibaba Cloud Operations MCP Server

by RadiumGu

delete_oss_bucket

Remove an OSS storage bucket from Alibaba Cloud by specifying its name and region to free up resources or manage storage efficiently.

Instructions

删除OSS存储桶

Args: bucket_name: 存储桶名称 region: 区域ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameYes
regionNocn-beijing

Implementation Reference

  • Main handler and registration for the 'delete_oss_bucket' MCP tool. It wraps the low-level OSS_DeleteBucket by searching oss_tools.tools and invoking it with appropriate parameters.
    @app.tool() def delete_oss_bucket(bucket_name: str, region: str = "cn-beijing") -> str: """删除OSS存储桶 Args: bucket_name: 存储桶名称 region: 区域ID """ try: sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'alibaba_cloud_ops_mcp_server')) from tools import oss_tools # 查找删除存储桶的工具 for tool_func in oss_tools.tools: if hasattr(tool_func, '__name__') and 'delete' in tool_func.__name__.lower(): result = tool_func(BucketName=bucket_name, RegionId=region) return f"✅ 成功删除OSS存储桶: {bucket_name}" return f"OSS存储桶删除功能可用,桶名: {bucket_name}" except Exception as e: return f"OSS存储桶删除失败: {str(e)}"
  • Low-level helper function OSS_DeleteBucket that performs the actual Alibaba Cloud OSS API call to delete a bucket. This is invoked by the main handler.
    @tools.append def OSS_DeleteBucket( BucketName: str = Field(description='AlibabaCloud OSS Bucket Name'), RegionId: str = Field(description='AlibabaCloud region ID', default='cn-hangzhou') ): """删除指定的OSS存储空间。""" client = create_client(region_id=RegionId) result = client.delete_bucket(oss.DeleteBucketRequest(bucket=BucketName)) return result.__str__()
  • Pydantic Field definitions provide input schema/validation with descriptions for the OSS_DeleteBucket helper.
    @tools.append def OSS_DeleteBucket( BucketName: str = Field(description='AlibabaCloud OSS Bucket Name'), RegionId: str = Field(description='AlibabaCloud region ID', default='cn-hangzhou') ): """删除指定的OSS存储空间。""" client = create_client(region_id=RegionId) result = client.delete_bucket(oss.DeleteBucketRequest(bucket=BucketName)) return result.__str__()

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/RadiumGu/alicloud-ops-mcp'

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