Skip to main content
Glama
akave-ai

Akave MCP Server

by akave-ai

fetch_headers

Retrieve headers and metadata for a specific object stored in an S3-compatible bucket, providing essential information about the object's properties without downloading its content.

Instructions

Fetch headers/metadata for an object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketYesBucket name
keyYesObject key

Implementation Reference

  • The MCP tool handler for 'fetch_headers' which invokes the S3 client's fetchHeaders method and formats the response as MCP content.
    async ({ bucket, key }) => {
      const headers = await this.s3Client.fetchHeaders(bucket, key);
      return {
        content: [{ type: "text", text: JSON.stringify(headers) }],
      };
    }
  • Zod input schema defining the parameters for the 'fetch_headers' tool: bucket and key.
    {
      bucket: z.string().describe("Bucket name"),
      key: z.string().describe("Object key"),
    },
  • src/server.ts:196-209 (registration)
    Registration of the 'fetch_headers' MCP tool including name, description, schema, and handler function.
    this.server.tool(
      "fetch_headers",
      "Fetch headers/metadata for an object",
      {
        bucket: z.string().describe("Bucket name"),
        key: z.string().describe("Object key"),
      },
      async ({ bucket, key }) => {
        const headers = await this.s3Client.fetchHeaders(bucket, key);
        return {
          content: [{ type: "text", text: JSON.stringify(headers) }],
        };
      }
    );
  • Helper function in S3Client that performs a HeadObjectCommand to retrieve object metadata/headers.
    async fetchHeaders(bucket: string, key: string) {
      const command = new HeadObjectCommand({
        Bucket: bucket,
        Key: key,
      });
      return await this.client.send(command);
    }
Behavior2/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 implies a read-only operation ('fetch') but doesn't specify authentication requirements, rate limits, error conditions (e.g., if the object doesn't exist), or what metadata fields are returned. This leaves significant gaps for an agent to understand the tool's behavior.

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, efficient sentence with zero waste. It's front-loaded with the core purpose and uses clear terminology. Every word earns its place, making it easy for an agent to parse quickly.

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 complexity of object storage operations and the lack of annotations and output schema, the description is incomplete. It doesn't explain what headers/metadata are returned, potential side effects, or how it fits into the broader context of sibling tools like 'get_object'. For a tool in a server with destructive operations, more guidance is needed.

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 'bucket' and 'key' parameters. The description adds no additional meaning beyond the schema, such as format examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, but there's no extra value from the description.

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 ('fetch') and target ('headers/metadata for an object'), distinguishing it from siblings like 'get_object' (which likely retrieves content) and 'list_objects' (which lists multiple objects). However, it doesn't explicitly differentiate from potential metadata-focused siblings, keeping it from a perfect score.

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 like 'get_object' (which might include headers) or other metadata-related operations. It lacks context about prerequisites, such as needing read permissions or existing objects, which is critical given the server's sibling tools include destructive operations.

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/akave-ai/akave-mcp'

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