Skip to main content
Glama
InsForge

Insforge MCP Server

create-bucket

Create a new storage bucket for organizing and managing files in cloud infrastructure, with options to set public or private access.

Instructions

Create new storage bucket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyNoAPI key for authentication (optional if provided via --api_key)
bucketNameYes
isPublicNo

Implementation Reference

  • Core execution logic for the create-bucket tool: authenticates with API key, sends POST request to backend /api/storage/buckets endpoint with bucketName and isPublic, handles response with formatting and background context, or returns error.
    withUsageTracking('create-bucket', async ({ apiKey, bucketName, isPublic }) => {
      try {
        const actualApiKey = getApiKey(apiKey);
        const response = await fetch(`${API_BASE_URL}/api/storage/buckets`, {
          method: 'POST',
          headers: {
            'x-api-key': actualApiKey,
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({ bucketName, isPublic } as CreateBucketRequest),
        });
    
        const result = await handleApiResponse(response);
    
        return await addBackgroundContext({
          content: [
            {
              type: 'text',
              text: formatSuccessMessage('Bucket created', result),
            },
          ],
        });
      } catch (error) {
        const errMsg = error instanceof Error ? error.message : 'Unknown error occurred';
        return {
          content: [
            {
              type: 'text',
              text: `Error creating bucket: ${errMsg}`,
            },
          ],
          isError: true,
        };
      }
    })
  • MCP server.tool registration for 'create-bucket': specifies name, description, input parameters schema, and references the wrapped handler function.
    server.tool(
      'create-bucket',
      'Create new storage bucket',
      {
        apiKey: z
          .string()
          .optional()
          .describe('API key for authentication (optional if provided via --api_key)'),
        ...createBucketRequestSchema.shape,
      },
      withUsageTracking('create-bucket', async ({ apiKey, bucketName, isPublic }) => {
        try {
          const actualApiKey = getApiKey(apiKey);
          const response = await fetch(`${API_BASE_URL}/api/storage/buckets`, {
            method: 'POST',
            headers: {
              'x-api-key': actualApiKey,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({ bucketName, isPublic } as CreateBucketRequest),
          });
    
          const result = await handleApiResponse(response);
    
          return await addBackgroundContext({
            content: [
              {
                type: 'text',
                text: formatSuccessMessage('Bucket created', result),
              },
            ],
          });
        } catch (error) {
          const errMsg = error instanceof Error ? error.message : 'Unknown error occurred';
          return {
            content: [
              {
                type: 'text',
                text: `Error creating bucket: ${errMsg}`,
              },
            ],
            isError: true,
          };
        }
      })
    );
  • Input validation schema using Zod: optional apiKey string and spreads createBucketRequestSchema.shape (defines bucketName and isPublic fields). createBucketRequestSchema imported from external package.
    {
      apiKey: z
        .string()
        .optional()
        .describe('API key for authentication (optional if provided via --api_key)'),
      ...createBucketRequestSchema.shape,
    },
  • Registers all Insforge tools (including create-bucket) on the Streamable HTTP MCP server instance.
    registerInsforgeTools(mcpServer, {
      apiKey,
      apiBaseUrl,
    });
  • Registers all Insforge tools (including create-bucket) on the Stdio MCP server instance.
    const toolsConfig = registerInsforgeTools(server, {
      apiKey: api_key,
      apiBaseUrl: api_base_url || process.env.API_BASE_URL,
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Create' implies a write/mutation operation, it doesn't mention permission requirements, whether creation is idempotent, rate limits, or what happens if a bucket with the same name exists. This leaves significant behavioral gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just three words, with zero wasted language. It's front-loaded with the essential action and resource, making it efficient though potentially under-specified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 3 parameters, 33% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, error conditions, or important behavioral aspects. The description should provide more context given the complexity and lack of structured documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% (only 'apiKey' has a description), leaving 'bucketName' and 'isPublic' undocumented in the schema. The description adds no parameter information beyond what's implied by the tool name, failing to compensate for the low schema coverage. It doesn't explain what 'bucketName' should contain or what 'isPublic' controls.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create new storage bucket' clearly states the verb ('Create') and resource ('storage bucket'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list-buckets' or 'delete-bucket' beyond the obvious action difference, so it doesn't reach the highest clarity level.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list-buckets' or 'delete-bucket', nor does it mention prerequisites or constraints. It simply states what the tool does without contextual usage information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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