Skip to main content
Glama

get_blob_info

Retrieve details about a blob, such as size and availability, by providing its unique ID. Part of the Walrus MCP Server for decentralized storage and blockchain-verified data access.

Instructions

Get information about a blob (size, availability, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blobIdYesThe blob ID to get information about

Implementation Reference

  • MCP tool call handler for get_blob_info: parses arguments using schema, calls WalrusClient.getBlobInfo, and formats result as JSON text content.
    case 'get_blob_info': { const { blobId } = GetBlobInfoSchema.parse(args); const result = await walrusClient.getBlobInfo(blobId); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Zod schema for validating get_blob_info tool input parameters.
    const GetBlobInfoSchema = z.object({ blobId: z.string().describe('The blob ID to get information about'), });
  • src/index.ts:116-129 (registration)
    Tool registration metadata returned by listTools: name, description, and input schema definition.
    { name: 'get_blob_info', description: 'Get information about a blob (size, availability, etc.)', inputSchema: { type: 'object', properties: { blobId: { type: 'string', description: 'The blob ID to get information about', }, }, required: ['blobId'], }, },
  • Core implementation of getBlobInfo in WalrusClient: performs HTTP HEAD request to aggregator to retrieve blob metadata like size.
    async getBlobInfo(blobId: string): Promise<BlobInfo> { try { // Try to get blob head information const response = await this.httpClient.head(`${this.config.aggregatorUrl}/v1/${blobId}`); const size = parseInt(response.headers['content-length'] || '0'); return { blobId, size, encodedSize: size, // Approximate, actual encoded size may differ storageId: blobId, certified: true, // If we can access it, it's certified }; } catch (error) { if (axios.isAxiosError(error)) { if (error.response?.status === 404) { throw new Error(`Blob not found: ${blobId}`); } throw new Error(`Failed to get blob info: ${error.response?.data?.error || error.message}`); } throw new Error(`Failed to get blob info: ${error instanceof Error ? error.message : String(error)}`); } }
  • TypeScript interface defining the BlobInfo return type structure.
    export interface BlobInfo { blobId: string; size: number; encodedSize: number; storageId: string; certified: boolean; certifiedEpoch?: number; endEpoch?: number; }

Other Tools

Related 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/Mr-Sunglasses/walrus-mcp'

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