Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

get_flow_results

Retrieve forensic collection results from Velociraptor flows for digital forensics and incident response analysis.

Instructions

Get results from a specific Velociraptor collection flow.

Args: client_id: The client ID (e.g., 'C.1234567890abcdef') flow_id: The flow ID (e.g., 'F.1234567890') artifact: Optional specific artifact to get results for limit: Maximum number of result rows to return (default 1000)

Returns: Collection results data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idYes
flow_idYes
artifactNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function 'get_flow_results' which executes the logic to fetch flow results via Velociraptor VQL.
    @mcp.tool()
    async def get_flow_results(
        client_id: str,
        flow_id: str,
        artifact: Optional[str] = None,
        limit: int = 1000,
    ) -> list[TextContent]:
        """Get results from a specific Velociraptor collection flow.
    
        Args:
            client_id: The client ID (e.g., 'C.1234567890abcdef')
            flow_id: The flow ID (e.g., 'F.1234567890')
            artifact: Optional specific artifact to get results for
            limit: Maximum number of result rows to return (default 1000)
    
        Returns:
            Collection results data.
        """
        try:
            # Input validation
            client_id = validate_client_id(client_id)
            flow_id = validate_flow_id(flow_id)
            limit = validate_limit(limit)
            client = get_client()
    
            # Build the VQL query
            if artifact:
                vql = f"""
                SELECT * FROM source(
                    client_id='{client_id}',
                    flow_id='{flow_id}',
                    artifact='{artifact}'
                ) LIMIT {limit}
                """
            else:
                vql = f"""
                SELECT * FROM source(
                    client_id='{client_id}',
                    flow_id='{flow_id}'
                ) LIMIT {limit}
                """
    
            results = client.query(vql)
    
            return [TextContent(
                type="text",
                text=json.dumps({
                    "client_id": client_id,
                    "flow_id": flow_id,
                    "artifact": artifact,
                    "result_count": len(results),
                    "results": results,
                }, indent=2, default=str)
            )]
    
        except grpc.RpcError as e:
            error_response = map_grpc_error(e, f"flow results for {flow_id}")
            # Check if it's a not-found error
            if "NOT_FOUND" in error_response.get("grpc_status", ""):
                error_response["hint"] = f"Flow {flow_id} may not exist for client {client_id}. Use list_flows(client_id='{client_id}') to see available flows."
            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 valid client ID (C.*) and flow ID (F.*)"
                })
            )]
    
        except Exception:
            # Generic errors - don't expose internals
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": "Failed to get flow results",
                    "hint": "Check IDs and Velociraptor server connection"
                })
            )]
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 but only minimally satisfies it. It states 'Returns: Collection results data' but lacks crucial behavioral details: whether the operation is read-only, what format the results take (JSON, CSV, rows), whether it blocks until completion, or pagination behavior beyond the limit parameter.

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 Args/Returns structure is clear and front-loaded. Each sentence earns its place by documenting parameters or return values. Minor deduction for the docstring-style formatting which consumes vertical space, though this is acceptable for the parameter detail provided.

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?

Given the presence of an output schema (not shown but indicated in context signals), the description appropriately avoids duplicating return value documentation. With four parameters and zero schema coverage, the description successfully documents all inputs. Minor gap: lacks guidance on flow state requirements or error handling scenarios.

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 description coverage. The description provides semantic meaning for all four parameters: client_id and flow_id include format examples (C.123..., F.123...), artifact explains it filters to a specific optional artifact, and limit clarifies it controls maximum result rows with the default value.

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 explicitly states 'Get results from a specific Velociraptor collection flow' with a clear verb (Get) and resource (results). It effectively distinguishes from siblings like get_flow_status (which checks status/metadata) and get_hunt_results (which retrieves hunt-level aggregates rather than individual flow data).

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 fails to mention prerequisites such as needing a valid flow_id from list_flows, does not clarify whether to use get_flow_status first to check completion, and omits error conditions (e.g., querying incomplete flows).

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