Skip to main content
Glama
jneless
by jneless

tos_delete_object

Delete objects from Volcengine TOS storage by specifying bucket name and object key to manage storage resources efficiently.

Instructions

删除 TOS 对象

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameYes存储桶名称
object_keyYes对象键名

Implementation Reference

  • The main handler function that executes the deletion of the TOS object by extracting bucket_name and object_key from arguments and calling tos_client.delete_object.
    async def delete_object(args: Dict[str, Any]) -> List[TextContent]:
        """删除对象"""
        bucket_name = args["bucket_name"]
        object_key = args["object_key"]
        
        try:
            tos_client.delete_object(bucket_name, object_key)
            return [TextContent(type="text", text=f"成功删除对象: {object_key}")]
        except Exception as e:
            return [TextContent(type="text", text=f"删除对象失败: {str(e)}")]
  • The tool schema definition including input validation for bucket_name and object_key, registered in list_tools().
    Tool(
        name="tos_delete_object",
        description="删除 TOS 对象",
        inputSchema={
            "type": "object",
            "properties": {
                "bucket_name": {
                    "type": "string",
                    "description": "存储桶名称"
                },
                "object_key": {
                    "type": "string",
                    "description": "对象键名"
                }
            },
            "required": ["bucket_name", "object_key"]
        }
    ),
  • The dispatch logic in call_tool() that routes 'tos_delete_object' calls to the delete_object handler.
    elif name == "tos_delete_object":
        return await delete_object(arguments)

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/jneless/tos-mcp'

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