Skip to main content
Glama

get_blob

Retrieve stored data from Walrus decentralized storage by providing the blob ID, enabling access to blockchain-verified content on the Sui network.

Instructions

Retrieve a blob from Walrus storage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blobIdYesThe blob ID to retrieve

Implementation Reference

  • MCP tool handler for 'get_blob': parses arguments with GetBlobSchema and calls walrusClient.getBlob, returning the result as text content
    case 'get_blob': { const { blobId } = GetBlobSchema.parse(args); const result = await walrusClient.getBlob(blobId); return { content: [ { type: 'text', text: result, }, ], }; }
  • Zod input schema validation for the get_blob tool (requires blobId string)
    const GetBlobSchema = z.object({ blobId: z.string().describe('The blob ID to retrieve'), });
  • src/index.ts:74-87 (registration)
    Tool registration descriptor for 'get_blob' in the ListTools response, defining name, description, and input schema
    { name: 'get_blob', description: 'Retrieve a blob from Walrus storage', inputSchema: { type: 'object', properties: { blobId: { type: 'string', description: 'The blob ID to retrieve', }, }, required: ['blobId'], }, },
  • Core implementation of blob retrieval in WalrusClient: HTTP GET to aggregator, returns base64-encoded blob data with error handling
    async getBlob(blobId: string): Promise<string> { try { const response = await this.httpClient.get( `${this.config.aggregatorUrl}/v1/${blobId}`, { responseType: 'arraybuffer', } ); // Return as base64 encoded string return Buffer.from(response.data).toString('base64'); } catch (error) { if (axios.isAxiosError(error)) { if (error.response?.status === 404) { throw new Error(`Blob not found: ${blobId}`); } throw new Error(`Failed to retrieve blob: ${error.response?.data?.error || error.message}`); } throw new Error(`Failed to retrieve blob: ${error instanceof Error ? error.message : String(error)}`); } }

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