extend_experiment
Extend the expiration time of a CloudLab experiment by specifying the number of hours to add, preventing premature termination.
Instructions
Extend the expiration time of an experiment
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| experiment_id | Yes | Experiment UUID (from list_experiments) | |
| hours | Yes | Number of hours to extend |
Implementation Reference
- src/index.ts:388-406 (handler)The handler logic for the 'extend_experiment' tool. It extracts experiment_id and hours from arguments, calls cloudlabRequest with PUT /experiments/{id} and body {extend_by: hours}, and returns the result.case "extend_experiment": { const { experiment_id, hours } = args as { experiment_id: string; hours: number; }; const result = await cloudlabRequest( `/experiments/${experiment_id}`, "PUT", { extend_by: hours } ); return { content: [ { type: "text", text: `Extension requested: ${JSON.stringify(result, null, 2)}`, }, ], }; }
- src/index.ts:221-238 (registration)Registration of the 'extend_experiment' tool in the ListTools handler, including description and input schema definition.{ name: "extend_experiment", description: "Extend the expiration time of an experiment", inputSchema: { type: "object", properties: { experiment_id: { type: "string", description: "Experiment UUID (from list_experiments)", }, hours: { type: "number", description: "Number of hours to extend", }, }, required: ["experiment_id", "hours"], }, },
- src/index.ts:221-238 (schema)Input schema for the 'extend_experiment' tool, defining required parameters: experiment_id (string) and hours (number).{ name: "extend_experiment", description: "Extend the expiration time of an experiment", inputSchema: { type: "object", properties: { experiment_id: { type: "string", description: "Experiment UUID (from list_experiments)", }, hours: { type: "number", description: "Number of hours to extend", }, }, required: ["experiment_id", "hours"], }, },