create-network-storage
Define and allocate network storage for a specific cluster using cluster ID, storage name, and size in GB. Ensures resources are efficiently organized and accessible for Novita MCP Server operations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clusterId | Yes | The ID of the cluster to create network storage. Must be from the `list-clusters` tool result, and the cluster must have supportNetworkStorage set to true | |
| storageName | Yes | Name for the network storage. Use only letters, numbers, and hyphens | |
| storageSize | Yes | Size of the network storage in GB |
Implementation Reference
- src/tools.ts:517-527 (handler)The handler function for the 'create-network-storage' tool. It makes a POST request to the Novita API endpoint '/networkstorage/create' with the input parameters and formats the response as a text content block.}, async (params) => { const result = await novitaRequest("/networkstorage/create", "POST", params); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; });
- src/tools.ts:505-517 (schema)Zod input schema defining parameters for the 'create-network-storage' tool: clusterId (string), storageName (string, nonempty, trimmed), storageSize (number >=10).clusterId: z .string() .describe("The ID of the cluster to create network storage. Must be from the `list-clusters` tool result, and the cluster must have supportNetworkStorage set to true"), storageName: z .string() .nonempty() .trim() .describe("Name for the network storage. Use only letters, numbers, and hyphens"), storageSize: z .number() .min(10) .describe("Size of the network storage in GB"), }, async (params) => {
- src/tools.ts:504-527 (registration)The server.tool call that registers the 'create-network-storage' tool, providing its input schema and inline handler function.server.tool("create-network-storage", { clusterId: z .string() .describe("The ID of the cluster to create network storage. Must be from the `list-clusters` tool result, and the cluster must have supportNetworkStorage set to true"), storageName: z .string() .nonempty() .trim() .describe("Name for the network storage. Use only letters, numbers, and hyphens"), storageSize: z .number() .min(10) .describe("Size of the network storage in GB"), }, async (params) => { const result = await novitaRequest("/networkstorage/create", "POST", params); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; });