Skip to main content
Glama
moimran

EVE-NG MCP Server

by moimran

create_lab

Create a new network lab in EVE-NG with specified name and metadata to build and test network topologies.

Instructions

Create a new lab in EVE-NG.

This tool creates a new lab with the specified name and metadata in the given path on the EVE-NG server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathNo/
descriptionNo
authorNo
versionNo1

Implementation Reference

  • Pydantic model defining the input schema/arguments for the create_lab tool.
    class CreateLabArgs(BaseModel):
        """Arguments for create_lab tool."""
        name: str = Field(description="Name of the lab")
        path: str = Field(default="/", description="Path where to create the lab (default: /)")
        description: str = Field(default="", description="Lab description")
        author: str = Field(default="", description="Lab author")
        version: str = Field(default="1", description="Lab version")
  • The core handler function for the 'create_lab' tool. It checks connection, calls the EVE-NG client to create the lab, and returns success or error messages as TextContent.
    @mcp.tool()
    async def create_lab(name: str, path: str = "/", description: str = "", author: str = "", version: str = "1") -> list[TextContent]:
        """
        Create a new lab in EVE-NG.
    
        This tool creates a new lab with the specified name and metadata
        in the given path on the EVE-NG server.
        """
        try:
            logger.info(f"Creating lab: {name} in {path}")
    
            if not eveng_client.is_connected:
                return [TextContent(
                    type="text",
                    text="Not connected to EVE-NG server. Use connect_eveng_server tool first."
                )]
    
            # Create lab
            lab = await eveng_client.create_lab(
                name=name,
                path=path,
                description=description,
                author=author,
                version=version
            )
    
            return [TextContent(
                type="text",
                text=f"Successfully created lab!\n\n"
                     f"Name: {name}\n"
                     f"Path: {path}\n"
                     f"Description: {description}\n"
                     f"Author: {author}\n"
                     f"Version: {version}\n\n"
                     f"Lab is ready for adding nodes and networks."
            )]
    
        except Exception as e:
            logger.error(f"Failed to create lab: {e}")
            return [TextContent(
                type="text",
                text=f"Failed to create lab: {str(e)}"
            )]
  • Registration call for lab management tools (including create_lab) within the central register_tools function.
    # Lab management tools
    register_lab_tools(mcp, eveng_client)
  • Top-level registration of all tools (including create_lab) in the MCP server initialization.
    # Register tools
    register_tools(self.mcp, self.eveng_client)
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the tool creates a lab but doesn't disclose permissions needed, whether it's idempotent, error conditions (e.g., invalid path), or what happens on success (e.g., returns lab ID). This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness4/5

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

The description is brief and front-loaded with the main purpose in the first sentence. Both sentences are relevant, though the second could be more informative. There's no wasted text, but it's under-specified rather than concise.

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?

For a creation tool with 5 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on behavior, parameter meanings, error handling, and return values, making it insufficient for reliable agent use.

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 but only vaguely mentions 'name and metadata' and 'given path'. It doesn't explain the purpose of each parameter (e.g., 'description', 'author', 'version'), their formats, or constraints, leaving most of the 5 parameters undocumented.

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 ('create a new lab') and resource ('in EVE-NG'), with specific mention of 'name and metadata' and 'given path'. It distinguishes from siblings like 'list_labs' or 'delete_lab' by focusing on creation, though it doesn't explicitly contrast with 'create_lab_network' which creates a different resource type.

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 on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., server connection), exclusions (e.g., duplicate names), or comparisons to sibling tools like 'create_lab_network' for related operations.

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