Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

list_flows

Retrieve forensic collection flows for a Velociraptor client to monitor investigation status and collected artifacts.

Instructions

List collection flows for a Velociraptor client.

Args: client_id: The client ID (e.g., 'C.1234567890abcdef') limit: Maximum number of flows to return (default 50)

Returns: List of flows with their status and artifacts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the `list_flows` tool. It takes a client_id and a limit, validates them, queries the Velociraptor server using a VQL query, and formats the response.
    @mcp.tool()
    async def list_flows(
        client_id: str,
        limit: int = 50,
    ) -> list[TextContent]:
        """List collection flows for a Velociraptor client.
    
        Args:
            client_id: The client ID (e.g., 'C.1234567890abcdef')
            limit: Maximum number of flows to return (default 50)
    
        Returns:
            List of flows with their status and artifacts.
        """
        try:
            # Input validation
            client_id = validate_client_id(client_id)
            limit = validate_limit(limit)
            client = get_client()
    
            vql = f"SELECT * FROM flows(client_id='{client_id}') LIMIT {limit}"
            results = client.query(vql)
    
            # Format the results
            formatted = []
            for row in results:
                flow = {
                    "flow_id": row.get("session_id", ""),
                    "state": row.get("state", ""),
                    "artifacts": row.get("artifacts_with_results", []),
                    "request": {
                        "artifacts": row.get("request", {}).get("artifacts", []),
                        "creator": row.get("request", {}).get("creator", ""),
                    },
                    "create_time": row.get("create_time", ""),
                    "start_time": row.get("start_time", ""),
                    "active_time": row.get("active_time", ""),
                    "total_uploaded_bytes": row.get("total_uploaded_bytes", 0),
                    "total_collected_rows": row.get("total_collected_rows", 0),
                    "total_logs": row.get("total_logs", 0),
                }
                formatted.append(flow)
    
            return [TextContent(
                type="text",
                text=json.dumps(formatted, indent=2, default=str)
            )]
    
        except grpc.RpcError as e:
            error_response = map_grpc_error(e, f"listing flows for {client_id}")
            # Check if it's a not-found error
            if "NOT_FOUND" in error_response.get("grpc_status", ""):
                error_response["hint"] = f"Client {client_id} may not exist. Use list_clients() to see available clients."
            return [TextContent(
                type="text",
                text=json.dumps(error_response)
            )]
Behavior3/5

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

With no annotations provided, the description must carry the full behavioral burden. It discloses return value structure ('List of flows with their status and artifacts'), but fails to mention safety characteristics (read-only vs destructive), pagination behavior beyond the limit parameter, or permission requirements.

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 efficient and scannable. Every sentence earns its place by documenting parameters or return values. The format is slightly docstring-technical rather than conversational, but remains appropriately sized and front-loaded.

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 simple 2-parameter list operation with no nested objects, the description is adequate. It hints at output structure (status and artifacts) compensating for the lack of a formal output schema, and covers all input parameters sufficiently for invocation.

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?

Given 0% schema description coverage, the description effectively compensates by providing a concrete example format for 'client_id' ('C.1234567890abcdef') and explaining the 'limit' parameter's default value of 50. Both parameters are semantically documented beyond the raw schema types.

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 clearly states the specific verb 'List' and resource 'collection flows' for a 'Velociraptor client'. It effectively distinguishes from siblings like 'cancel_flow' (action on single flow), 'get_flow_results' (specific flow data retrieval), and 'list_clients' (different resource entirely).

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 guidance is provided on when to use this tool versus alternatives like 'get_flow_status' or 'get_flow_results', or when to prefer it over 'cancel_flow'. There are no stated prerequisites, exclusions, or workflow context for the agent.

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