Skip to main content
Glama
moimran

EVE-NG MCP Server

by moimran

stop_node

Gracefully shut down a running node in an EVE-NG network lab to preserve its state and stop operations.

Instructions

Stop a specific node.

This tool stops a running node in the lab. The node will be gracefully shut down and its state will be preserved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argumentsYes

Implementation Reference

  • The main MCP tool handler function for 'stop_node'. It validates arguments, checks EVE-NG connection, calls the underlying client API, and formats the response as TextContent.
    async def stop_node(arguments: NodeControlArgs) -> list[TextContent]:
        """
        Stop a specific node.
    
        This tool stops a running node in the lab. The node will be gracefully
        shut down and its state will be preserved.
        """
        try:
            logger.info(f"Stopping node {arguments.node_id} in {arguments.lab_path}")
    
            if not eveng_client.is_connected:
                return [TextContent(
                    type="text",
                    text="Not connected to EVE-NG server. Use connect_eveng_server tool first."
                )]
    
            # Stop node
            result = await eveng_client.stop_node(arguments.lab_path, arguments.node_id)
    
            if result.get('status') == 'success':
                return [TextContent(
                    type="text",
                    text=f"Successfully stopped node {arguments.node_id} in {arguments.lab_path}\n\n"
                         f"The node has been shut down and its state has been preserved."
                )]
            else:
                return [TextContent(
                    type="text",
                    text=f"Failed to stop node: {result.get('message', 'Unknown error')}"
                )]
    
        except Exception as e:
            logger.error(f"Failed to stop node: {e}")
            return [TextContent(
                type="text",
                text=f"Failed to stop node: {str(e)}"
            )]
  • Pydantic model defining the input schema/arguments for the stop_node tool: lab_path and node_id.
    class NodeControlArgs(BaseModel):
        """Arguments for node control operations."""
        lab_path: str = Field(description="Full path to the lab (e.g., /lab_name.unl)")
        node_id: str = Field(description="Node ID to control")
  • Registration call to register_node_tools within the overall register_tools function, which registers the stop_node tool using @mcp.tool() decorators inside node_management.py.
    # Node management tools
    register_node_tools(mcp, eveng_client)
  • Underlying client method called by the MCP handler to perform the actual stop_node API call to EVE-NG.
    async def stop_node(self, lab_path: str, node_id: str) -> Dict[str, Any]:
        """Stop a specific node."""
        await self.ensure_connected()
    
        try:
            result = await asyncio.to_thread(self.api.stop_node, lab_path, node_id)
            self.logger.info("Stopped node", lab_path=lab_path, node_id=node_id)
            return result
        except Exception as e:
            self.logger.error("Failed to stop node", **log_error(e, {"lab_path": lab_path, "node_id": node_id}))
            raise EVENGAPIError(f"Failed to stop node: {str(e)}")
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: 'gracefully shut down' and 'state will be preserved,' which are crucial for understanding this non-destructive operation. However, it lacks details about permissions, error conditions, or what 'preserved' entails exactly.

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 front-loaded with the core purpose, followed by clarifying behavioral details in two concise sentences. Every sentence adds value without redundancy, making it easy to parse.

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 state-altering operation with 1 parameter at 0% schema coverage and no output schema), the description is incomplete. It covers the basic action and preservation behavior but lacks parameter explanations, error handling, and output details, leaving significant gaps for an agent.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'a specific node' but doesn't explain the required 'arguments' parameter or its nested 'lab_path' and 'node_id' fields. No parameter details are provided beyond the tool's general purpose.

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 ('stop') and resource ('a specific node'), with additional context about graceful shutdown and state preservation. However, it doesn't explicitly differentiate from sibling tools like 'stop_all_nodes' or 'wipe_node' beyond the 'specific node' phrasing.

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?

No guidance is provided about when to use this tool versus alternatives like 'stop_all_nodes' (for multiple nodes) or 'wipe_node' (for destructive reset). The description mentions 'a specific node' but doesn't contrast with other node control operations or specify prerequisites.

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/moimran/eveng-mcp'

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