list-buckets
Retrieve all storage buckets from Insforge MCP Server's cloud infrastructure to manage data storage for AI development projects.
Instructions
Lists all storage buckets
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/shared/tools.ts:726-757 (handler)Handler function for the 'list-buckets' tool. Makes a GET request to the backend API to list all storage buckets, handles the response, adds background context, and formats the output. Wrapped with usage tracking.withUsageTracking('list-buckets', async () => { try { const response = await fetch(`${API_BASE_URL}/api/storage/buckets`, { method: 'GET', headers: { 'x-api-key': getApiKey(), }, }); const result = await handleApiResponse(response); return await addBackgroundContext({ content: [ { type: 'text', text: formatSuccessMessage('Buckets retrieved', result), }, ], }); } catch (error) { const errMsg = error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text', text: `Error listing buckets: ${errMsg}`, }, ], isError: true, }; } })
- src/shared/tools.ts:722-758 (registration)Registration of the 'list-buckets' tool using server.tool(). Includes tool name, description, empty input schema ({}), and the wrapped handler function.server.tool( 'list-buckets', 'Lists all storage buckets', {}, withUsageTracking('list-buckets', async () => { try { const response = await fetch(`${API_BASE_URL}/api/storage/buckets`, { method: 'GET', headers: { 'x-api-key': getApiKey(), }, }); const result = await handleApiResponse(response); return await addBackgroundContext({ content: [ { type: 'text', text: formatSuccessMessage('Buckets retrieved', result), }, ], }); } catch (error) { const errMsg = error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text', text: `Error listing buckets: ${errMsg}`, }, ], isError: true, }; } }) );