Skip to main content
Glama

delete-bucket

Remove a storage bucket from the Insforge backend service to free up resources and manage your cloud storage infrastructure.

Instructions

Deletes a storage bucket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyNoAPI key for authentication (optional if provided via --api_key)
bucketNameYesName of the bucket to delete

Implementation Reference

  • Core handler function that performs the DELETE API request to remove the specified storage bucket, handles the response, formats success/error messages, and wraps the result with background context.
    withUsageTracking('delete-bucket', async ({ apiKey, bucketName }) => { try { const actualApiKey = getApiKey(apiKey); const response = await fetch(`${API_BASE_URL}/api/storage/buckets/${bucketName}`, { method: 'DELETE', headers: { 'x-api-key': actualApiKey, }, }); const result = await handleApiResponse(response); return await addBackgroundContext({ content: [ { type: 'text', text: formatSuccessMessage('Bucket deleted', result), }, ], }); } catch (error) { const errMsg = error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text', text: `Error deleting bucket: ${errMsg}`, }, ], isError: true, }; } })
  • Zod input schema defining parameters: optional apiKey (string) and required bucketName (string).
    { apiKey: z .string() .optional() .describe('API key for authentication (optional if provided via --api_key)'), bucketName: z.string().describe('Name of the bucket to delete'), },
  • Registers the 'delete-bucket' tool on the MCP server with name, description, input schema, and handler wrapped in usage tracking.
    server.tool( 'delete-bucket', 'Deletes a storage bucket', { apiKey: z .string() .optional() .describe('API key for authentication (optional if provided via --api_key)'), bucketName: z.string().describe('Name of the bucket to delete'), }, withUsageTracking('delete-bucket', async ({ apiKey, bucketName }) => { try { const actualApiKey = getApiKey(apiKey); const response = await fetch(`${API_BASE_URL}/api/storage/buckets/${bucketName}`, { method: 'DELETE', headers: { 'x-api-key': actualApiKey, }, }); const result = await handleApiResponse(response); return await addBackgroundContext({ content: [ { type: 'text', text: formatSuccessMessage('Bucket deleted', result), }, ], }); } catch (error) { const errMsg = error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text', text: `Error deleting bucket: ${errMsg}`, }, ], isError: true, }; } }) );

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/InsForge/insforge-mcp'

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