Skip to main content
Glama

get_object_metadata

Retrieve metadata for Huawei OBS objects without downloading content. Get content type, size, last modified date, ETag, storage class, and custom metadata by specifying bucket and key.

Instructions

Get metadata for an object from the 'huawei_obs' source without downloading content. Returns content type, size, last modified date, ETag, storage class, and custom metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketYesThe name of the bucket containing the object
keyYesThe object key (full path) to get metadata for

Implementation Reference

  • src/server.ts:230-248 (registration)
    Registration of the 'get_object_metadata' tool using McpServer.tool(). Includes inline Zod schema for inputs (bucket, key) and the handler function which currently returns a placeholder TODO response. Registered per storage source with optional suffix.
    // get_object_metadata tool
    server.tool(
      `get_object_metadata${toolSuffix}`,
      `Get metadata for an object from the '${sourceId}' source without downloading content. Returns content type, size, last modified date, ETag, storage class, and custom metadata.`,
      {
        bucket: z.string().describe("The name of the bucket containing the object"),
        key: z.string().describe("The object key (full path) to get metadata for"),
      },
      async (args) => {
        // TODO: Implement actual metadata retrieval with storage provider
        return createToolSuccessResponse({
          message: `Metadata retrieval from '${sourceId}' not yet implemented`,
          bucket: args.bucket,
          key: args.key,
          source_id: sourceId,
          note: "Storage provider integration pending",
        });
      }
    );
  • TypeScript interface GetObjectMetadataToolConfig defining the tool name and source for configuration purposes.
    /**
     * Built-in storage tool configuration for get_object_metadata
     */
    export interface GetObjectMetadataToolConfig {
      name: "get_object_metadata";
      source: string;
    }
  • 'get_object_metadata' listed as one of the built-in storage tools, used for validation and identification.
    export const BUILTIN_STORAGE_TOOLS = [
      "list_buckets",
      "list_objects",
      "get_object",
      "get_object_metadata",
      "search_objects",
    ] as const;
  • The core handler function for executing the get_object_metadata tool logic. Currently unimplemented (TODO) and returns a mock error response with input arguments.
    async (args) => {
      // TODO: Implement actual metadata retrieval with storage provider
      return createToolSuccessResponse({
        message: `Metadata retrieval from '${sourceId}' not yet implemented`,
        bucket: args.bucket,
        key: args.key,
        source_id: sourceId,
        note: "Storage provider integration pending",
      });
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the operation as read-only and non-destructive by specifying 'without downloading content' and listing return values, but it lacks details on error handling, authentication needs, or rate limits, which are important for a tool interacting with an external source.

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 front-loaded with the core purpose in the first sentence and efficiently lists return values in the second. Every sentence adds value, with no redundant or unnecessary information, making it appropriately sized and well-structured.

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

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is mostly complete: it explains the purpose, usage context, and return values. However, it could improve by addressing potential errors or prerequisites, as there's no output schema to clarify response formats.

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 input schema has 100% description coverage, clearly documenting both parameters ('bucket' and 'key'). The description does not add any parameter-specific semantics beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Get metadata'), resource ('an object from the 'huawei_obs' source'), and scope ('without downloading content'), distinguishing it from sibling tools like 'get_object' (which likely downloads content) and 'list_objects' (which lists rather than gets metadata).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('without downloading content'), implying it's for metadata retrieval only. However, it does not explicitly state when not to use it or name alternatives, such as using 'get_object' for content download, which would be helpful for sibling differentiation.

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/zq940222/hybrid-mcp'

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