Skip to main content
Glama

tos_get_bucket_meta

Retrieve metadata for a specified TOS storage bucket to access configuration details and properties through the TOS MCP Server.

Instructions

获取存储桶元数据

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameYes存储桶名称

Implementation Reference

  • The handler function that executes the tos_get_bucket_meta tool logic: extracts bucket_name, calls tos_client.head_bucket, formats metadata as JSON, handles errors.
    async def get_bucket_meta(args: Dict[str, Any]) -> List[TextContent]: """获取存储桶元数据""" bucket_name = args["bucket_name"] try: resp = tos_client.head_bucket(bucket_name) meta = { "bucket_name": bucket_name, "region": resp.region, "storage_class": str(resp.storage_class) if resp.storage_class else None } return [TextContent(type="text", text=json.dumps(meta, indent=2, ensure_ascii=False))] except Exception as e: return [TextContent(type="text", text=f"获取存储桶元数据失败: {str(e)}")]
  • The tool schema definition including inputSchema for bucket_name (required string).
    Tool( name="tos_get_bucket_meta", description="获取存储桶元数据", inputSchema={ "type": "object", "properties": { "bucket_name": { "type": "string", "description": "存储桶名称" } }, "required": ["bucket_name"] } ),
  • Tool dispatch registration in the call_tool handler, mapping 'tos_get_bucket_meta' to the get_bucket_meta function.
    elif name == "tos_get_bucket_meta": return await get_bucket_meta(arguments)
  • Tool registration in list_tools(), defining name, description, and schema.
    Tool( name="tos_get_bucket_meta", description="获取存储桶元数据", inputSchema={ "type": "object", "properties": { "bucket_name": { "type": "string", "description": "存储桶名称" } }, "required": ["bucket_name"] } ),

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