Skip to main content
Glama
jneless
by jneless

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"]
        }
    ),
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 ('获取' - get) but does not describe traits such as read-only nature (implied by 'get'), authentication requirements, rate limits, error conditions (e.g., if bucket doesn't exist), or response format. This is a significant gap for a tool with no annotation coverage.

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 phrase ('获取存储桶元数据') that is highly concise and front-loaded, with no wasted words. It efficiently conveys the core purpose without unnecessary elaboration, earning a top score for brevity and clarity in structure.

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 (a read operation with one parameter) and lack of annotations and output schema, the description is incomplete. It fails to explain what metadata is returned, error handling, or behavioral context, making it inadequate for an agent to fully understand the tool's operation beyond its basic purpose.

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?

The schema description coverage is 100%, with the parameter 'bucket_name' documented as '存储桶名称' (bucket name). The description does not add any meaning beyond this, such as format constraints (e.g., naming rules) or examples. Since the schema fully describes the parameter, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '获取存储桶元数据' (Get bucket metadata) states a clear verb ('获取' - get) and resource ('存储桶元数据' - bucket metadata), establishing the tool's basic purpose. However, it lacks specificity about what metadata is retrieved (e.g., creation date, permissions, size) and does not differentiate from siblings like 'tos_list_buckets' (which lists buckets) or 'tos_get_object' (which retrieves object data), leaving room for ambiguity.

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 existence), exclusions (e.g., not for object data), or comparisons to siblings like 'tos_list_buckets' (for listing) or 'tos_get_object' (for object retrieval), leaving the agent to infer usage from the name alone.

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

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