Skip to main content
Glama

reboot_node

Restart a specific node within a CloudLab experiment to resolve issues or apply configuration changes. Specify the experiment ID and node identifier to initiate the reboot process.

Instructions

Reboot a specific node in an experiment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
experiment_idYesExperiment UUID (from list_experiments)
nodeYesNode client_id (e.g., 'node0')

Implementation Reference

  • The handler function for the 'reboot_node' tool. It extracts experiment_id and node from arguments, makes a POST request to the CloudLab API endpoint `/experiments/{experiment_id}/node/{node}/reboot`, and returns the result.
    case "reboot_node": {
      const { experiment_id, node } = args as {
        experiment_id: string;
        node: string;
      };
      const result = await cloudlabRequest(
        `/experiments/${experiment_id}/node/${node}/reboot`,
        "POST"
      );
      return {
        content: [
          {
            type: "text",
            text: `Reboot initiated for node ${node}: ${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
  • The input schema definition for the 'reboot_node' tool, returned in the list_tools response. Requires experiment_id and node.
    {
      name: "reboot_node",
      description: "Reboot a specific node in an experiment",
      inputSchema: {
        type: "object",
        properties: {
          experiment_id: {
            type: "string",
            description: "Experiment UUID (from list_experiments)",
          },
          node: {
            type: "string",
            description: "Node client_id (e.g., 'node0')",
          },
        },
        required: ["experiment_id", "node"],
      },
    },
  • src/index.ts:97-255 (registration)
    The ListToolsRequestHandler registers all tools including 'reboot_node' by returning their schemas.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "list_experiments",
            description: "List all your CloudLab experiments",
            inputSchema: {
              type: "object",
              properties: {},
              required: [],
            },
          },
          {
            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"],
            },
          },
          {
            name: "get_experiment",
            description: "Get detailed status of a specific experiment including node states",
            inputSchema: {
              type: "object",
              properties: {
                experiment_id: {
                  type: "string",
                  description: "Experiment UUID (from list_experiments)",
                },
              },
              required: ["experiment_id"],
            },
          },
          {
            name: "reboot_node",
            description: "Reboot a specific node in an experiment",
            inputSchema: {
              type: "object",
              properties: {
                experiment_id: {
                  type: "string",
                  description: "Experiment UUID (from list_experiments)",
                },
                node: {
                  type: "string",
                  description: "Node client_id (e.g., 'node0')",
                },
              },
              required: ["experiment_id", "node"],
            },
          },
          {
            name: "reboot_all_nodes",
            description: "Reboot all nodes in an experiment",
            inputSchema: {
              type: "object",
              properties: {
                experiment_id: {
                  type: "string",
                  description: "Experiment UUID (from list_experiments)",
                },
              },
              required: ["experiment_id"],
            },
          },
          {
            name: "reload_node",
            description: "Reload/reimage a node with its disk image",
            inputSchema: {
              type: "object",
              properties: {
                experiment_id: {
                  type: "string",
                  description: "Experiment UUID (from list_experiments)",
                },
                node: {
                  type: "string",
                  description: "Node client_id",
                },
              },
              required: ["experiment_id", "node"],
            },
          },
          {
            name: "powercycle_node",
            description: "Power cycle a node (hard reboot)",
            inputSchema: {
              type: "object",
              properties: {
                experiment_id: {
                  type: "string",
                  description: "Experiment UUID (from list_experiments)",
                },
                node: {
                  type: "string",
                  description: "Node client_id",
                },
              },
              required: ["experiment_id", "node"],
            },
          },
          {
            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"],
            },
          },
          {
            name: "terminate_experiment",
            description: "Terminate an experiment (WARNING: destroys all data)",
            inputSchema: {
              type: "object",
              properties: {
                experiment_id: {
                  type: "string",
                  description: "Experiment UUID (from list_experiments)",
                },
              },
              required: ["experiment_id"],
            },
          },
        ],
      };
    });
  • src/index.ts:258-438 (registration)
    The CallToolRequestHandler registers the execution logic for all tools via the switch statement on tool name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        switch (name) {
          case "list_experiments": {
            const result = await cloudlabRequest("/experiments");
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify(result, null, 2),
                },
              ],
            };
          }
    
          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)}`,
                },
              ],
            };
          }
    
          case "get_experiment": {
            const { experiment_id } = args as { experiment_id: string };
            const result = await cloudlabRequest(`/experiments/${experiment_id}`);
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify(result, null, 2),
                },
              ],
            };
          }
    
          case "reboot_node": {
            const { experiment_id, node } = args as {
              experiment_id: string;
              node: string;
            };
            const result = await cloudlabRequest(
              `/experiments/${experiment_id}/node/${node}/reboot`,
              "POST"
            );
            return {
              content: [
                {
                  type: "text",
                  text: `Reboot initiated for node ${node}: ${JSON.stringify(result, null, 2)}`,
                },
              ],
            };
          }
    
          case "reboot_all_nodes": {
            const { experiment_id } = args as { experiment_id: string };
            const result = await cloudlabRequest(
              `/experiments/${experiment_id}/nodes/reboot`,
              "POST"
            );
            return {
              content: [
                {
                  type: "text",
                  text: `Reboot initiated for all nodes: ${JSON.stringify(result, null, 2)}`,
                },
              ],
            };
          }
    
          case "reload_node": {
            const { experiment_id, node } = args as {
              experiment_id: string;
              node: string;
            };
            const result = await cloudlabRequest(
              `/experiments/${experiment_id}/node/${node}/reload`,
              "POST"
            );
            return {
              content: [
                {
                  type: "text",
                  text: `Reload initiated for node ${node}: ${JSON.stringify(result, null, 2)}`,
                },
              ],
            };
          }
    
          case "powercycle_node": {
            const { experiment_id, node } = args as {
              experiment_id: string;
              node: string;
            };
            const result = await cloudlabRequest(
              `/experiments/${experiment_id}/node/${node}/powercycle`,
              "POST"
            );
            return {
              content: [
                {
                  type: "text",
                  text: `Power cycle initiated for node ${node}: ${JSON.stringify(result, null, 2)}`,
                },
              ],
            };
          }
    
          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)}`,
                },
              ],
            };
          }
    
          case "terminate_experiment": {
            const { experiment_id } = args as { experiment_id: string };
            const result = await cloudlabRequest(
              `/experiments/${experiment_id}`,
              "DELETE"
            );
            return {
              content: [
                {
                  type: "text",
                  text: `Experiment termination initiated: ${JSON.stringify(result, null, 2)}`,
                },
              ],
            };
          }
    
          default:
            throw new Error(`Unknown tool: ${name}`);
        }
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    });
  • Helper function used by all tools, including reboot_node, to make authenticated requests to the CloudLab API.
    async function cloudlabRequest(
      endpoint: string,
      method: string = "GET",
      body?: object
    ): Promise<any> {
      const token = loadToken();
      const url = `${CLOUDLAB_API_BASE}${endpoint}`;
    
      const headers: Record<string, string> = {
        "X-Api-Token": token,
        "Accept": "application/json",
      };
    
      if (body) {
        headers["Content-Type"] = "application/json";
      }
    
      const response = await fetch(url, {
        method,
        headers,
        body: body ? JSON.stringify(body) : undefined,
        redirect: "follow",
      });
    
      if (!response.ok) {
        const text = await response.text();
        throw new Error(`CloudLab API error (${response.status}): ${text}`);
      }
    
      const contentType = response.headers.get("content-type");
      if (contentType?.includes("application/json")) {
        return response.json();
      }
      return response.text();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Reboot') but does not explain what 'reboot' entails (e.g., graceful restart vs. forced, downtime implications, permissions required, or side effects). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with zero waste, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation operation with potential side effects), lack of annotations, and no output schema, the description is incomplete. It does not cover behavioral aspects like what happens during the reboot, error conditions, or return values, leaving critical gaps for an agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters (experiment_id and node). The description does not add any additional meaning beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Reboot') and target ('a specific node in an experiment'), providing a specific verb+resource combination. However, it does not explicitly differentiate from sibling tools like 'reboot_all_nodes' (which reboots all nodes) or 'powercycle_node' (which might have different behavior), leaving some ambiguity in sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing an experiment ID from 'list_experiments'), exclusions (e.g., when not to reboot), or comparisons to siblings like 'reboot_all_nodes' or 'powercycle_node', leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ArdaGurcan/cloudlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server