Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

export_deployment_docs

Generate comprehensive deployment documentation including server access details, agent deployment guides, security configurations, and troubleshooting guides for forensic investigation workflows.

Instructions

Generate comprehensive deployment documentation.

Creates documentation including:

  • Server access details

  • Agent deployment guides

  • Security configuration

  • Troubleshooting guides

Args: deployment_id: The deployment to document output_path: Optional path for documentation files

Returns: Path to generated documentation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_idYes
output_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Implementation of the export_deployment_docs tool handler which generates deployment documentation.
    async def export_deployment_docs(
        deployment_id: str,
        output_path: Optional[str] = None,
    ) -> list[TextContent]:
        """Generate comprehensive deployment documentation.
    
        Creates documentation including:
        - Server access details
        - Agent deployment guides
        - Security configuration
        - Troubleshooting guides
    
        Args:
            deployment_id: The deployment to document
            output_path: Optional path for documentation files
    
        Returns:
            Path to generated documentation.
        """
        try:
            from pathlib import Path
            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)
    
            # Create output directory
            if output_path:
                output_dir = Path(output_path)
            else:
                output_dir = Path(os.environ.get("LOCALAPPDATA", "~")).expanduser() / "megaraptor-mcp" / "docs" / deployment_id
    
            output_dir.mkdir(parents=True, exist_ok=True)
    
            # Generate main README
            readme = f"""# Velociraptor Deployment Documentation
    
    **Deployment ID**: {deployment_id}
    **Profile**: {info.profile}
    **Target**: {info.target}
    **Created**: {info.created_at}
    
    ## Server Access
    
    - **GUI URL**: {info.server_url}
    - **API URL**: {info.api_url}
    - **CA Fingerprint**: {bundle.ca_fingerprint if bundle else 'N/A'}
    
    ## Quick Start
    
    ### Access the GUI
    
    1. Open {info.server_url} in your browser
    2. Accept the self-signed certificate
    3. Log in with the admin credentials provided at deployment
    
    ### Connect MCP
    
    Set the following environment variable:
    ```bash
    export VELOCIRAPTOR_CONFIG_PATH=/path/to/api_client.yaml
    ```
    
    ### Deploy Agents
    
    Use the MCP tools to generate and deploy agents:
    - `generate_agent_installer` - Create platform installers
    - `deploy_agents_winrm` - Push to Windows
    - `deploy_agents_ssh` - Push to Linux/macOS
    - `generate_gpo_package` - Create GPO deployment bundle
    - `generate_ansible_playbook` - Create Ansible playbook
    
    ## Security Notes
    
    - All communications use mTLS encryption
    - CA certificate is pinned in all agent configurations
    - Admin password was shown only at creation time
    {f"- Auto-destruction scheduled: {info.auto_destroy_at}" if info.auto_destroy_at else ""}
    
    ## Support
    
    For issues, see the troubleshooting guide or contact your administrator.
    """
    
            readme_file = output_dir / "README.md"
            readme_file.write_text(readme)
    
            # Save CA certificate for reference
            if bundle:
                ca_file = output_dir / "ca.crt"
                ca_file.write_text(bundle.ca_cert)
    
            return [TextContent(
                type="text",
                text=json.dumps({
                    "success": True,
                    "output_directory": str(output_dir),
                    "files": [
                        str(readme_file),
                        str(ca_file) if bundle else None,
                    ],
                }, 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?

No annotations provided, so description carries full burden. It discloses what outputs are produced (documentation sections) and return type (Path), but omits critical behavioral traits: whether it overwrites existing files, disk space requirements, or if the operation is idempotent.

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 (purpose, content list, args, returns). Uses bullet points for readability. No redundant text, though the docstring-style formatting (Args/Returns) is slightly unconventional for MCP descriptions.

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?

Adequate for a 2-parameter tool with simple schema. The description covers inputs and return value (noting output schema exists). However, given this is a file-generating tool with no annotations, it lacks safety warnings or side effect disclosures that would make it complete.

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 has 0% description coverage. The Args section compensates by describing deployment_id as 'The deployment to document' and output_path as 'Optional path for documentation files', providing basic semantic meaning. However, it lacks details on path format requirements or default behavior when output_path is null.

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?

Clear verb ('Generate') and resource ('deployment documentation'). Lists specific content sections (server access, agent guides, etc.) that distinguish it from sibling deployment tools like deploy_agents_ssh or generate_server_config which handle actual deployment rather than documentation.

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 explicit guidance on when to use vs alternatives. While the deployment_id parameter implies use after deployment exists, there is no mention of prerequisites, when to prefer this over manual documentation, or relationship to sibling tools like generate_server_config.

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