watson_create_space
Creates a Watson Machine Learning deployment space with specified name, description, compute instance, and region.
Instructions
Create a Watson deployment space
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| description | No | ||
| compute_name | No | WML instance CRN | |
| region | No |
Implementation Reference
- src/tools/watson/index.ts:60-67 (handler)MCP tool handler for 'watson_create_space' - accepts name, description, compute_name, and region; constructs the request body and POSTs to the WML v2/spaces endpoint.
server.tool("watson_create_space", "Create a Watson deployment space", { name: z.string(), description: z.string().optional(), compute_name: z.string().optional().describe("WML instance CRN"), region: z.string().optional(), }, async (p) => safeTool(async () => { w(); const body: Record<string,unknown> = {name:p.name, description:p.description}; if(p.compute_name) body.compute=[{name:p.compute_name,type:"machine_learning"}]; return client.post(`${ml(p.region||r)}/v2/spaces`, body, {version:ver}); })); - src/tools/watson/index.ts:61-62 (schema)Zod schema defining the input parameters for the watson_create_space tool: name (required), description (optional), compute_name (optional WML instance CRN), region (optional).
name: z.string(), description: z.string().optional(), compute_name: z.string().optional().describe("WML instance CRN"), region: z.string().optional(), - src/tools/watson/index.ts:7-7 (registration)Registration function that registers all Watson tools on the MCP server, including watson_create_space.
export function registerWatsonTools(server: McpServer, client: IBMCloudAPIClient, config: ServerConfig) { - src/server.ts:68-69 (registration)Top-level call to registerWatsonTools which registers watson_create_space among all Watson tools.
registerWatsonTools(server, client, config); console.error(` ✓ Watson AI (8 tools)`); - src/config.ts:75-77 (helper)Endpoint helper for constructing the Watson ML base URL based on region.
WATSON_ML: (region: string) => `https://${region}.ml.cloud.ibm.com`,