list_blobs
Retrieve a specified number of stored blobs from the Walrus decentralized storage network, with a default limit of 10, for efficient data management and accessibility.
Instructions
List stored blobs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of blobs to list (default: 10) |
Implementation Reference
- src/walrus-client.ts:153-159 (handler)The listBlobs method in WalrusClient class that implements the core logic of the 'list_blobs' tool. Currently a placeholder that logs a warning and returns an empty array since Walrus lacks native blob listing.async listBlobs(limit: number = 10): Promise<string[]> { // Note: Walrus doesn't provide a native list blobs API // This would typically require maintaining a local index or using Sui blockchain queries // For now, return empty array with a note console.warn('listBlobs: Walrus does not provide native blob listing. Consider maintaining a local index.'); return []; }
- src/index.ts:39-41 (schema)Zod schema used for input validation of the list_blobs tool parameters in the CallToolRequestHandler.const ListBlobsSchema = z.object({ limit: z.number().optional().describe('Maximum number of blobs to list (default: 10)'), });
- src/index.ts:88-101 (registration)Tool registration/declaration for 'list_blobs' in the ListToolsRequestHandler response, including name, description, and input schema.{ name: 'list_blobs', description: 'List stored blobs', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number of blobs to list (default: 10)', default: 10, }, }, }, },
- src/index.ts:166-177 (helper)Handler case in the main CallToolRequestHandler switch statement that parses arguments using the schema and invokes the listBlobs method on the WalrusClient instance.case 'list_blobs': { const { limit = 10 } = ListBlobsSchema.parse(args); const result = await walrusClient.listBlobs(limit); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }