Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

generate_agent_installer

Create platform-specific agent installers with embedded configuration for the Velociraptor forensics platform. Generate Windows, Linux, or macOS packages that deploy without additional setup.

Instructions

Generate an agent installer package with embedded configuration.

Creates platform-specific installers that can be deployed without additional configuration.

Args: deployment_id: The deployment to generate installer for os_type: Target OS - 'windows', 'linux', or 'macos' installer_type: Installer format - 'msi', 'deb', 'rpm', or 'pkg' (auto-selected based on os_type if not specified) labels: Labels to apply to agents installed with this package

Returns: Path to generated installer and installation instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_idYes
os_typeNowindows
installer_typeNo
labelsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool 'generate_agent_installer' is implemented in 'src/megaraptor_mcp/tools/deployment.py'. It handles the logic for generating agent installer packages for different OS types by loading deployment certificates and calling 'InstallerGenerator'.
    async def generate_agent_installer(
        deployment_id: str,
        os_type: str = "windows",
        installer_type: Optional[str] = None,
        labels: Optional[list[str]] = None,
    ) -> list[TextContent]:
        """Generate an agent installer package with embedded configuration.
    
        Creates platform-specific installers that can be deployed without
        additional configuration.
    
        Args:
            deployment_id: The deployment to generate installer for
            os_type: Target OS - 'windows', 'linux', or 'macos'
            installer_type: Installer format - 'msi', 'deb', 'rpm', or 'pkg'
                          (auto-selected based on os_type if not specified)
            labels: Labels to apply to agents installed with this package
    
        Returns:
            Path to generated installer and installation instructions.
        """
        try:
            from ..deployment.agents import InstallerGenerator, InstallerType
            from ..deployment.security import CertificateManager
            from ..deployment.deployers import DockerDeployer
    
            # Get deployment info
            deployer = DockerDeployer()
            info = await deployer.get_status(deployment_id)
    
            if not info:
                return [TextContent(
                    type="text",
                    text=json.dumps({
                        "error": f"Deployment not found: {deployment_id}",
                        "hint": "Use list_deployments tool to see available deployments"
                    }, indent=2)
                )]
    
            # Load certificates
            cert_manager = CertificateManager()
            bundle = cert_manager.load_bundle(deployment_id)
    
            if not bundle:
                return [TextContent(
                    type="text",
                    text=json.dumps({
                        "error": "Certificate bundle not found"
                    }, indent=2)
                )]
    
            # Determine installer type
            type_map = {
                "windows": InstallerType.MSI,
                "linux": InstallerType.DEB,
                "macos": InstallerType.PKG,
            }
            if installer_type:
                inst_type = InstallerType(installer_type.lower())
            else:
                inst_type = type_map.get(os_type.lower(), InstallerType.ZIP)
    
            # Create installer config
            from ..deployment.agents.installer_gen import InstallerConfig
            config = InstallerConfig(
                server_url=info.server_url.replace("/api/", "") + f":{8000}/",
                ca_cert=bundle.ca_cert,
                ca_fingerprint=bundle.ca_fingerprint,
                labels=labels or [],
                deployment_id=deployment_id,
            )
    
            # Generate installer
            generator = InstallerGenerator()
            result = await generator.generate(config, inst_type)
    
            return [TextContent(
                type="text",
                text=json.dumps(result.to_dict(), indent=2)
            )]
    
        except ImportError as e:
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": f"Missing dependency: {str(e)}",
                    "hint": "Install required packages with: pip install megaraptor-mcp[deployment]"
                }, indent=2)
            )]
    
        except Exception:
            # Generic errors - don't expose internals
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": "Operation failed",
                    "hint": "Check deployment configuration and try again"
                }, indent=2)
            )]
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the output is a package with 'embedded configuration' that requires no additional configuration to deploy, and that it returns a path and instructions. However, it omits critical behavioral details: whether the operation is idempotent, if it overwrites existing files, execution duration expectations, or required permissions for the generated installers.

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?

Well-structured with clear sections: summary, behavioral detail, Args, and Returns. The opening sentences are slightly redundant ('Generate...' followed by 'Creates...') but the second adds valuable context about platform-specificity and zero-config deployment. The Args section is efficiently formatted with inline value constraints.

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 the output schema exists, the brief Returns summary is adequate. The 4 parameters are well-documented in the description text. However, for a tool involving artifact generation and deployment preparation, the description should mention prerequisites (deployment must exist) and storage implications. The lack of differentiation from direct deployment siblings leaves contextual gaps.

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

Parameters5/5

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

Excellent compensation for 0% schema coverage. The Args section documents all 4 parameters comprehensively: deployment_id's purpose, os_type's valid values ('windows', 'linux', 'macos'), installer_type's options ('msi', 'deb', 'rpm', 'pkg') with auto-selection logic, and labels' function. This provides complete semantic meaning missing from the schema.

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 it generates 'an agent installer package with embedded configuration' and creates 'platform-specific installers.' It specifies the resource (agent installer) and action (generate/create). However, it could better differentiate from sibling tools like deploy_agents_ssh or deploy_agents_winrm by explicitly stating this produces offline-installable packages rather than performing direct deployment.

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 lacks explicit guidance on when to use this tool versus direct deployment alternatives (ssh/winrm). It mentions the package 'can be deployed without additional configuration' but does not state prerequisites (e.g., requiring an existing deployment_id) or scenarios where this approach is preferred over other deployment methods in the sibling list.

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/wagonbomb/megaraptor-mcp'

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