Skip to main content
Glama
aliyun

AlibabaCloud MCP Server

Official
by aliyun

DeleteBucket

Remove AlibabaCloud OSS buckets efficiently by specifying the region and bucket name. Simplify storage management on AlibabaCloud MCP Server.

Instructions

删除指定的OSS存储空间。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
BucketNameYesAlibabaCloud OSS Bucket Name
RegionIdNoAlibabaCloud region IDcn-hangzhou

Implementation Reference

  • The handler function implementing the DeleteBucket tool logic by calling the Alibaba Cloud OSS client's delete_bucket method.
    @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__()
  • Registers all tools from oss_tools module (including OSS_DeleteBucket) to the FastMCP server.
    for tool in oss_tools.tools:
        mcp.tool(tool)
  • Helper function to create an authenticated OSS client used by the DeleteBucket handler.
    def create_client(region_id: str) -> oss.Client:
        credentials_provider = CredentialsProvider()
        cfg = oss.config.load_default()
        cfg.user_agent = 'alibaba-cloud-ops-mcp-server'
        cfg.credentials_provider = credentials_provider
        cfg.region = region_id
        return oss.Client(cfg)
  • Pydantic schema definitions for the input parameters of the DeleteBucket tool.
    BucketName: str = Field(description='AlibabaCloud OSS Bucket Name'),
    RegionId: str = Field(description='AlibabaCloud region ID', default='cn-hangzhou')
  • Appends the OSS_DeleteBucket function to the tools list for later registration.
    @tools.append
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action is deletion, implying a destructive operation, but does not specify critical details such as whether deletion is permanent, requires specific permissions, has rate limits, or what happens if the bucket contains objects. This is a significant gap for a high-risk tool.

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, direct sentence that efficiently conveys the core action without unnecessary words. It is front-loaded with the key information ('删除指定的OSS存储空间'), making it highly concise and well-structured for quick understanding.

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

Completeness2/5

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

Given the tool's complexity (destructive deletion with 2 parameters) and the absence of both annotations and an output schema, the description is incomplete. It fails to address behavioral risks, usage prerequisites, or expected outcomes, which are essential for safe and effective tool invocation in this context.

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?

Schema description coverage is 100%, with clear descriptions for both parameters (BucketName and RegionId). The description does not add any semantic details beyond the schema, such as format constraints or examples. Since the schema adequately documents the parameters, the baseline score of 3 is appropriate.

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 action ('删除' meaning 'delete') and the resource ('OSS存储空间' meaning 'OSS storage space'), which is specific and unambiguous. However, it does not distinguish this tool from sibling tools like 'DeleteInstances' or 'ListBuckets', as it lacks context about what makes this deletion unique to OSS buckets versus other resources.

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 does not mention prerequisites (e.g., bucket must be empty), exclusions (e.g., cannot delete if in use), or refer to related tools like 'ListBuckets' for verification. This leaves the agent without context for proper 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

Related 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/aliyun/alibaba-cloud-ops-mcp-server'

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