create_experiment
Create a new CloudLab experiment from a specified profile to configure and deploy test environments for research or development projects.
Instructions
Create a new CloudLab experiment from a profile
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Project name (e.g., 'UCY-CS499-DC') | |
| profile_name | Yes | Profile name (e.g., 'small-lan') | |
| profile_project | Yes | Project that owns the profile (e.g., 'PortalProfiles') | |
| name | No | Optional experiment name (auto-generated if not provided) | |
| bindings | No | Optional profile parameter bindings (e.g., {nodeCount: '2', phystype: 'c220g1'}) |
Implementation Reference
- src/index.ts:275-300 (handler)The handler function for the 'create_experiment' tool. It extracts parameters from the request, constructs the request body, calls the CloudLab API to create the experiment via POST /experiments, and returns the result.case "create_experiment": { const { project, profile_name, profile_project, name, bindings } = args as { project: string; profile_name: string; profile_project: string; name?: string; bindings?: Record<string, string>; }; const body: Record<string, any> = { project, profile_name, profile_project, }; if (name) body.name = name; if (bindings) body.bindings = bindings; const result = await cloudlabRequest("/experiments", "POST", body); return { content: [ { type: "text", text: `Experiment created: ${JSON.stringify(result, null, 2)}`, }, ], }; }
- src/index.ts:109-138 (schema)The tool registration and input schema definition for 'create_experiment', including name, description, properties, and required fields for input validation.{ name: "create_experiment", description: "Create a new CloudLab experiment from a profile", inputSchema: { type: "object", properties: { project: { type: "string", description: "Project name (e.g., 'UCY-CS499-DC')", }, profile_name: { type: "string", description: "Profile name (e.g., 'small-lan')", }, profile_project: { type: "string", description: "Project that owns the profile (e.g., 'PortalProfiles')", }, name: { type: "string", description: "Optional experiment name (auto-generated if not provided)", }, bindings: { type: "object", description: "Optional profile parameter bindings (e.g., {nodeCount: '2', phystype: 'c220g1'})", }, }, required: ["project", "profile_name", "profile_project"], }, },