patch_instance
Modify attributes of a Tembo Cloud instance, including CPU, memory, storage, environment, and replicas, using organization and instance IDs.
Instructions
Update attributes on an existing Tembo instance
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpu | No | ||
| environment | No | ||
| instance_id | Yes | ||
| instance_name | No | ||
| memory | No | ||
| org_id | Yes | Organization ID that owns the instance | |
| replicas | No | ||
| spot | No | ||
| storage | No |
Implementation Reference
- src/tools.ts:385-403 (handler)The asynchronous handler function that implements the core logic of the 'patch_instance' tool. It destructures the request arguments typed as PatchInstance, calls temboClient.patchInstance with the path and body parameters, and returns the JSON-stringified response.patch_instance: async (request) => { const { org_id, instance_id, ...props } = request.params .arguments as PatchInstance & { org_id: string; instance_id: string; }; const response = await temboClient.patchInstance({ body: { ...props }, path: { org_id, instance_id }, }); return { content: [ { type: "text", text: JSON.stringify(response.data ?? response.error, null, 2), }, ], }; },
- src/tools.ts:178-230 (registration)The registration of the 'patch_instance' tool in the TOOLS array, defining its name, description, and detailed inputSchema for MCP tool protocol.{ name: "patch_instance" as const, description: "Update attributes on an existing Tembo instance", inputSchema: { type: "object", properties: { org_id: { type: "string", description: "Organization ID that owns the instance", }, instance_id: { type: "string" }, instance_name: { type: "string" }, cpu: { type: "string", enum: ["0.25", "0.5", "1", "2", "4", "6", "8", "12", "16", "32"], }, memory: { type: "string", enum: [ "512Mi", "1Gi", "2Gi", "4Gi", "8Gi", "12Gi", "16Gi", "24Gi", "32Gi", "64Gi", ], }, storage: { type: "string", enum: [ "10Gi", "50Gi", "100Gi", "200Gi", "300Gi", "400Gi", "500Gi", "1Ti", "1.5Ti", "2Ti", ], }, environment: { type: "string", enum: ["dev", "test", "prod"] }, replicas: { type: "integer" }, spot: { type: "boolean" }, }, required: ["org_id", "instance_id"], }, },
- src/tools.ts:181-229 (schema)The input schema (JSON Schema) for the 'patch_instance' tool, defining properties like org_id, instance_id, resource specs, etc., with required fields.inputSchema: { type: "object", properties: { org_id: { type: "string", description: "Organization ID that owns the instance", }, instance_id: { type: "string" }, instance_name: { type: "string" }, cpu: { type: "string", enum: ["0.25", "0.5", "1", "2", "4", "6", "8", "12", "16", "32"], }, memory: { type: "string", enum: [ "512Mi", "1Gi", "2Gi", "4Gi", "8Gi", "12Gi", "16Gi", "24Gi", "32Gi", "64Gi", ], }, storage: { type: "string", enum: [ "10Gi", "50Gi", "100Gi", "200Gi", "300Gi", "400Gi", "500Gi", "1Ti", "1.5Ti", "2Ti", ], }, environment: { type: "string", enum: ["dev", "test", "prod"] }, replicas: { type: "integer" }, spot: { type: "boolean" }, }, required: ["org_id", "instance_id"], },