Skip to main content
Glama
moimran

EVE-NG MCP Server

by moimran

list_node_templates

Retrieve available node templates for creating network nodes in EVE-NG labs, including supported images and configuration options.

Instructions

List available node templates in EVE-NG.

This tool retrieves all available node templates that can be used to create nodes in labs, including their supported images and options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argumentsYes

Implementation Reference

  • The @mcp.tool()-decorated asynchronous handler function implementing the core logic of the 'list_node_templates' tool. It checks connection, fetches templates via eveng_client, formats them nicely, and returns TextContent.
    @mcp.tool()
    async def list_node_templates(arguments: ListTemplatesArgs) -> list[TextContent]:
        """
        List available node templates in EVE-NG.
    
        This tool retrieves all available node templates that can be used
        to create nodes in labs, including their supported images and options.
        """
        try:
            logger.info("Listing available node templates")
    
            if not eveng_client.is_connected:
                return [TextContent(
                    type="text",
                    text="Not connected to EVE-NG server. Use connect_eveng_server tool first."
                )]
    
            # Get templates
            templates = await eveng_client.list_node_templates()
    
            if not templates.get('data'):
                return [TextContent(
                    type="text",
                    text="No node templates found on the server."
                )]
    
            # Format templates information
            templates_text = "Available Node Templates:\n\n"
    
            for template_name, template_info in templates['data'].items():
                templates_text += f"📦 {template_name}\n"
                templates_text += f"   Type: {template_info.get('type', 'Unknown')}\n"
                templates_text += f"   Description: {template_info.get('description', 'No description')}\n"
    
                # Show available images if any
                if 'listimages' in template_info and template_info['listimages']:
                    templates_text += f"   Images: {', '.join(template_info['listimages'])}\n"
    
                templates_text += "\n"
    
            return [TextContent(
                type="text",
                text=templates_text
            )]
    
        except Exception as e:
            logger.error(f"Failed to list node templates: {e}")
            return [TextContent(
                type="text",
                text=f"Failed to list node templates: {str(e)}"
            )]
  • Pydantic model defining the input schema for the list_node_templates tool. No arguments are required.
    class ListTemplatesArgs(BaseModel):
        """Arguments for list_node_templates tool."""
        pass  # No arguments needed
  • Registration call to register_node_tools(mcp, eveng_client), which defines the @mcp.tool()-decorated handler for list_node_templates inside the function.
    # Node management tools
    register_node_tools(mcp, eveng_client)
  • Helper method in EVENGClientWrapper that calls the underlying EVE-NG API to list node templates, used by the tool handler.
    async def list_node_templates(self) -> Dict[str, Any]:
        """List available node templates."""
        await self.ensure_connected()
    
        try:
            templates = await asyncio.to_thread(self.api.list_node_templates)
            self.logger.debug("Listed node templates")
            return templates
        except Exception as e:
            self.logger.error("Failed to list node templates", **log_error(e))
            raise EVENGAPIError(f"Failed to list node templates: {str(e)}")
  • Top-level registration in the MCP server initialization where all tools, including list_node_templates, are registered by calling register_tools.
    # 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 the full burden of behavioral disclosure. It states the tool 'retrieves all available node templates,' implying a read-only operation, but lacks details on permissions, rate limits, output format, or any side effects. This leaves gaps for a tool with no 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.

Conciseness5/5

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

The description is front-loaded with the core purpose in the first sentence and adds useful detail in the second. Both sentences earn their place by clarifying scope and content, with no redundant or verbose language, making it efficiently structured.

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

Completeness3/5

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

Given no annotations, no output schema, and a simple parameter-less schema, the description is minimally adequate. It explains what the tool does but lacks behavioral details like output format or usage context. For a read-only list tool, it's functional but could be more complete by addressing these gaps.

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

Parameters4/5

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

The input schema has one parameter ('arguments') with 0% description coverage and no properties, indicating zero parameters in practice. The description doesn't mention any parameters, which is appropriate here since there are none to document, aligning with the schema's empty structure.

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 tool's purpose with 'List available node templates in EVE-NG' and specifies what it retrieves ('all available node templates... including their supported images and options'). It distinguishes from siblings like 'list_labs' or 'list_nodes' by focusing on templates rather than labs or nodes themselves, though it doesn't explicitly contrast with them.

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 mentions templates 'can be used to create nodes in labs,' implying a prerequisite context, but offers no explicit when/when-not instructions or references to sibling tools like 'add_node' for creating nodes with templates.

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