Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

resource_create_instance

Provision a new IBM Cloud resource instance by specifying name, target region, resource group, and plan ID.

Instructions

Provision a new resource instance (any IBM Cloud service)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
targetYesRegion or location (e.g. us-south)
resource_groupYesResource group ID
resource_plan_idYesPlan CRN or ID
parametersNoJSON string of additional parameters

Implementation Reference

  • The `resource_create_instance` tool handler: registers an MCP tool that provisions a new IBM Cloud resource instance via POST to the Resource Controller API. It accepts name, target (region), resource_group, resource_plan_id, and optional parameters (JSON string). The handler includes write permission checking via `w()` (assertWriteAllowed).
    server.tool("resource_create_instance", "Provision a new resource instance (any IBM Cloud service)", {
      name: z.string(), target: z.string().describe("Region or location (e.g. us-south)"),
      resource_group: z.string().describe("Resource group ID"),
      resource_plan_id: z.string().describe("Plan CRN or ID"),
      parameters: z.string().optional().describe("JSON string of additional parameters"),
    }, async (p) => safeTool(async () => { w();
      return client.post(`${base}/resource_instances`, {
        name:p.name, target:p.target, resource_group:p.resource_group,
        resource_plan_id:p.resource_plan_id,
        parameters:p.parameters ? JSON.parse(p.parameters) : undefined,
      });
    }));
  • Input schema for `resource_create_instance`: name (string), target (string - region/location), resource_group (string - resource group ID), resource_plan_id (string - plan CRN/ID), parameters (optional string - JSON string of additional params).
    name: z.string(), target: z.string().describe("Region or location (e.g. us-south)"),
    resource_group: z.string().describe("Resource group ID"),
    resource_plan_id: z.string().describe("Plan CRN or ID"),
    parameters: z.string().optional().describe("JSON string of additional parameters"),
  • Tool registration via `server.tool("resource_create_instance", ...)` within `registerResourceManagementTools()`, which is called from `src/server.ts` line 77.
    server.tool("resource_create_instance", "Provision a new resource instance (any IBM Cloud service)", {
      name: z.string(), target: z.string().describe("Region or location (e.g. us-south)"),
      resource_group: z.string().describe("Resource group ID"),
      resource_plan_id: z.string().describe("Plan CRN or ID"),
      parameters: z.string().optional().describe("JSON string of additional parameters"),
    }, async (p) => safeTool(async () => { w();
      return client.post(`${base}/resource_instances`, {
        name:p.name, target:p.target, resource_group:p.resource_group,
        resource_plan_id:p.resource_plan_id,
        parameters:p.parameters ? JSON.parse(p.parameters) : undefined,
      });
    }));
  • The `safeTool` wrapper that catches errors and returns MCP-compatible success/error content. Used by the handler to wrap the async operation.
    export async function safeTool<T>(fn: () => Promise<T>): Promise<ReturnType<typeof successContent> | ReturnType<typeof errorContent>> {
      try {
        const result = await fn();
        return successContent(result);
      } catch (error) {
        return errorContent(error);
      }
    }
  • The `assertWriteAllowed` helper that throws `WriteNotAllowedError` if write operations are disabled (used by the `w()` call in the handler).
    export function assertWriteAllowed(allowWrite: boolean): void {
      if (!allowWrite) {
        throw new WriteNotAllowedError();
      }
Behavior2/5

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

No annotations provided, so description carries full burden. Description only says 'Provision' implying creation, but no details on side effects, required permissions, cost implications, or failure behavior. Minimal behavioral transparency.

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

Conciseness4/5

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

Extremely concise single sentence with no wasted words. However, brevity sacrifices completeness. Score reflects efficiency but under-specification.

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?

With 5 parameters, no output schema, and no annotations, the description is insufficient. It fails to explain return values, error handling, service-specific constraints, or how to use the 'parameters' JSON string. Significant gaps remain.

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

Parameters3/5

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

Schema coverage is 80%, so baseline is 3. Description adds no additional meaning beyond schema for parameters like name, target, resource_group, etc. It does not explain the semantics of 'parameters' field or any inter-parameter dependencies.

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

Purpose5/5

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

Description clearly states 'Provision a new resource instance (any IBM Cloud service)', providing a specific verb and resource. Among siblings like resource_delete_instance or resource_get_instance, this tool is uniquely identified as the creation operation.

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?

No guidance on when to use this tool versus alternatives, no prerequisites, no exclusions. The description lacks context for appropriate use cases.

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/ahmedselimmansor-ctrl/IBM_cloud_MCP_SERVER'

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