Skip to main content
Glama

get_blob

Retrieve stored data by specifying a blob ID from the Walrus decentralized storage network, ensuring blockchain-verified access through the Sui network.

Instructions

Retrieve a blob from Walrus storage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blobIdYesThe blob ID to retrieve

Implementation Reference

  • Handler for the 'get_blob' tool in the MCP call_tool request handler. Parses input arguments using GetBlobSchema, retrieves the blob via walrusClient.getBlob(blobId), and returns the base64-encoded blob content as text.
    case 'get_blob': { const { blobId } = GetBlobSchema.parse(args); const result = await walrusClient.getBlob(blobId); return { content: [ { type: 'text', text: result, }, ], }; }
  • Zod schema for validating input parameters of the get_blob tool: requires a blobId string.
    const GetBlobSchema = z.object({ blobId: z.string().describe('The blob ID to retrieve'), });
  • src/index.ts:74-87 (registration)
    Registration of the 'get_blob' tool in the list_tools response, including name, description, and JSON 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'], }, },
  • WalrusClient helper method that fetches the blob from the aggregator URL and returns it as a base64-encoded string. Called by the MCP tool handler.
    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)}`); } }

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