Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

db_set_scaling

Configure CPU, memory, and disk resources for a database deployment by specifying allocation counts and region.

Instructions

Set scaling for a database deployment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_idYes
group_idNo
cpu_allocation_countNo
memory_mbNo
disk_mbNo
regionNo

Implementation Reference

  • Handler function for db_set_scaling tool. Validates write permissions, builds a request body with cpu/memory/disk scaling parameters, and sends a PATCH request to the IBM Cloud Databases API to update scaling configuration.
    }, async (p) => safeTool(async () => { w();
      const body: Record<string,unknown> = {};
      if(p.cpu_allocation_count) body.cpu={allocation_count:p.cpu_allocation_count};
      if(p.memory_mb) body.memory={allocation_mb:p.memory_mb};
      if(p.disk_mb) body.disk={allocation_mb:p.disk_mb};
      return client.patch(`${base(p.region||r)}/deployments/${encodeURIComponent(p.deployment_id)}/groups/${p.group_id||"member"}`, body);
    }));
  • Zod schema defining input parameters for db_set_scaling: deployment_id (required), group_id (optional), cpu_allocation_count (optional number), memory_mb (optional number), disk_mb (optional number), region (optional string).
    deployment_id: z.string(), group_id: z.string().optional(),
    cpu_allocation_count: z.number().optional(), memory_mb: z.number().optional(), disk_mb: z.number().optional(),
    region: z.string().optional(),
  • Registration of db_set_scaling tool on the MCP server via server.tool(), within registerDatabaseTools() function. Registered along with 9 other database tools in the same file.
    server.tool("db_set_scaling", "Set scaling for a database deployment", {
      deployment_id: z.string(), group_id: z.string().optional(),
      cpu_allocation_count: z.number().optional(), memory_mb: z.number().optional(), disk_mb: z.number().optional(),
      region: z.string().optional(),
    }, async (p) => safeTool(async () => { w();
      const body: Record<string,unknown> = {};
      if(p.cpu_allocation_count) body.cpu={allocation_count:p.cpu_allocation_count};
      if(p.memory_mb) body.memory={allocation_mb:p.memory_mb};
      if(p.disk_mb) body.disk={allocation_mb:p.disk_mb};
      return client.patch(`${base(p.region||r)}/deployments/${encodeURIComponent(p.deployment_id)}/groups/${p.group_id||"member"}`, body);
    }));
  • Helper to build the base URL for IBM Cloud Databases API using the region-specific endpoint pattern https://api.{region}.databases.cloud.ibm.com/v5/ibm.
    const base = (r: string) => IBM_ENDPOINTS.DATABASES(r);
    const w = () => assertWriteAllowed(config.allowWrite);
  • Utility wrapper that executes the tool's callback safely, returning a success or error MCP response.
    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);
      }
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as whether changes are immediate, require a restart, or impact availability. The agent is left guessing about side effects.

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?

A single, concise sentence that directly conveys the tool's purpose. No unnecessary words.

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

Completeness1/5

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

For a tool with 6 parameters and no output schema, the description is severely incomplete. It fails to explain parameter usage, return values, or any operational semantics, making it inadequate for an AI to invoke correctly.

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

Parameters1/5

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

With 0% schema description coverage and no parameter details in the description, the agent has no understanding of what each parameter (e.g., cpu_allocation_count, memory_mb) means or its constraints. The description adds no value beyond the schema.

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?

The description clearly states the action ('Set scaling') and the resource ('database deployment'), distinguishing it from related tools like db_get_scaling and db_create_deployment.

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, prerequisites, or conditions for usage. The description is a single line with no context.

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