Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

modify_hunt

Control Velociraptor forensic hunts by starting, pausing, stopping, or archiving investigations through the Megaraptor MCP server for digital forensics and incident response workflows.

Instructions

Modify a Velociraptor hunt state.

Args: hunt_id: The hunt ID (e.g., 'H.1234567890') action: Action to perform: 'start', 'pause', 'stop', 'archive'

Returns: Updated hunt status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hunt_idYes
actionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler implementation for the modify_hunt tool, which updates the state of a Velociraptor hunt by executing a VQL query.
    async def modify_hunt(
        hunt_id: str,
        action: str,
    ) -> list[TextContent]:
        """Modify a Velociraptor hunt state.
    
        Args:
            hunt_id: The hunt ID (e.g., 'H.1234567890')
            action: Action to perform: 'start', 'pause', 'stop', 'archive'
    
        Returns:
            Updated hunt status.
        """
        try:
            # Input validation
            hunt_id = validate_hunt_id(hunt_id)
    
            action_map = {
                "start": "StartHuntRequest",
                "pause": "PauseHuntRequest",
                "stop": "StopHuntRequest",
                "archive": "ArchiveHuntRequest",
            }
    
            if action not in action_map:
                return [TextContent(
                    type="text",
                    text=json.dumps({
                        "error": f"Invalid action '{action}'. Must be one of: start, pause, stop, archive"
                    })
                )]
    
            client = get_client()
    
            # Use the hunt() function to modify the hunt
            if action == "start":
                vql = f"SELECT hunt_update(hunt_id='{hunt_id}', state='RUNNING') FROM scope()"
            elif action == "pause":
                vql = f"SELECT hunt_update(hunt_id='{hunt_id}', state='PAUSED') FROM scope()"
            elif action == "stop":
                vql = f"SELECT hunt_update(hunt_id='{hunt_id}', state='STOPPED') FROM scope()"
            else:  # archive
                vql = f"SELECT hunt_update(hunt_id='{hunt_id}', state='ARCHIVED') FROM scope()"
    
            results = client.query(vql)
    
            return [TextContent(
                type="text",
                text=json.dumps({
                    "hunt_id": hunt_id,
                    "action": action,
                    "status": "success",
                    "result": results[0] if results else None,
                }, indent=2, default=str)
            )]
    
        except grpc.RpcError as e:
            error_response = map_grpc_error(e, f"modifying hunt {hunt_id}")
            # Check if it's a not-found error
            if "NOT_FOUND" in error_response.get("grpc_status", ""):
                error_response["hint"] = f"Hunt {hunt_id} may not exist. Use list_hunts() to see available hunts."
            return [TextContent(
                type="text",
                text=json.dumps(error_response)
            )]
    
        except ValueError as e:
            # Validation errors
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": str(e),
                    "hint": "Provide a valid hunt ID starting with 'H.'"
                })
            )]
    
        except Exception:
            # Generic errors - don't expose internals
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": "Failed to modify hunt",
                    "hint": "Check hunt ID and action parameter"
                })
            )]
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 documents the return value ('Updated hunt status') and valid action values, but omits safety-critical behavioral details like reversibility of actions, permission requirements, or side effects of 'archive' vs 'stop' operations.

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 uses a clean, structured format (purpose statement → Args → Returns) with zero wasted words. Every sentence earns its place; the example ID format and action enum are essential details delivered efficiently.

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

Completeness4/5

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

For a two-parameter state-change tool, the description is nearly complete: it documents all inputs, lists valid values, and mentions the return. It could be improved by noting error conditions (e.g., invalid state transitions) or permission requirements, but the existence of an output schema reduces the need for detailed return documentation.

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?

Despite 0% schema description coverage, the Args section fully compensates by providing concrete semantics: hunt_id includes a format example ('H.1234567890') and action enumerates the four valid string values, effectively documenting both required parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with the specific verb 'Modify' and resource 'Velociraptor hunt state', clearly distinguishing it from siblings like 'create_hunt' (creation), 'list_hunts' (listing), and 'get_hunt_results' (retrieval).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description enumerates valid actions ('start', 'pause', 'stop', 'archive'), providing implied usage context for hunt lifecycle management. However, it lacks explicit guidance on when to use this versus alternatives (e.g., 'use create_hunt for new hunts') or prerequisites (e.g., hunt must exist).

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