Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

get_flow_status

Check the status of a forensic collection flow in Velociraptor, including state, progress, and errors, to monitor investigation workflows.

Instructions

Get the status of a specific collection flow.

Args: client_id: The client ID (e.g., 'C.1234567890abcdef') flow_id: The flow ID (e.g., 'F.1234567890')

Returns: Flow status including state, progress, and any errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idYes
flow_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `get_flow_status` handler function, decorated as an MCP tool. It validates the input client_id and flow_id, executes a VQL query, and returns the status of the flow.
    @mcp.tool()
    async def get_flow_status(
        client_id: str,
        flow_id: str,
    ) -> list[TextContent]:
        """Get the status of a specific collection flow.
    
        Args:
            client_id: The client ID (e.g., 'C.1234567890abcdef')
            flow_id: The flow ID (e.g., 'F.1234567890')
    
        Returns:
            Flow status including state, progress, and any errors.
        """
        try:
            # Input validation
            client_id = validate_client_id(client_id)
            flow_id = validate_flow_id(flow_id)
            client = get_client()
    
            vql = f"SELECT * FROM flows(client_id='{client_id}', flow_id='{flow_id}')"
            results = client.query(vql)
    
            if not results:
                return [TextContent(
                    type="text",
                    text=json.dumps({
                        "error": f"Flow {flow_id} not found for client {client_id}",
                        "hint": f"Use list_flows(client_id='{client_id}') to see available flows."
                    })
                )]
    
            flow = results[0]
    
            # Extract detailed status
            status = {
                "client_id": client_id,
                "flow_id": flow_id,
                "state": flow.get("state", ""),
                "artifacts_requested": flow.get("request", {}).get("artifacts", []),
                "artifacts_with_results": flow.get("artifacts_with_results", []),
                "create_time": flow.get("create_time", ""),
                "start_time": flow.get("start_time", ""),
                "active_time": flow.get("active_time", ""),
                "execution_duration": flow.get("execution_duration", 0),
                "total_uploaded_bytes": flow.get("total_uploaded_bytes", 0),
                "total_collected_rows": flow.get("total_collected_rows", 0),
                "outstanding_requests": flow.get("outstanding_requests", 0),
                "backtrace": flow.get("backtrace", ""),
                "status": flow.get("status", ""),
            }
    
            return [TextContent(
                type="text",
                text=json.dumps(status, indent=2, default=str)
            )]
    
        except grpc.RpcError as e:
            error_response = map_grpc_error(e, f"flow status 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 status",
                    "hint": "Check IDs and Velociraptor server connection"
                })
            )]
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses return values ('state, progress, and any errors') but fails to mention if this is a safe read-only operation, if there are rate limits, or caching behavior. It adds minimal behavioral context beyond the return shape.

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. The purpose statement comes first, followed by parameter examples and return value description. No sentences are wasted, though the 'Returns' section is slightly redundant given the presence of an output schema.

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?

For a 2-parameter read operation with an output schema, the description is minimally adequate. It covers the parameters via examples and hints at the return structure. However, given the complex sibling ecosystem (list_flows, get_flow_results, cancel_flow), it lacks contextual guidance on where this fits in the workflow.

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?

With 0% schema description coverage (only titles present), the description compensates by providing concrete examples for both parameters (e.g., 'C.1234567890abcdef', 'F.1234567890'). This adds necessary semantic meaning that the bare schema lacks, though it does not explain the conceptual relationship between client_id and flow_id.

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 the tool 'Get[s] the status of a specific collection flow' with a specific verb and resource. However, it does not differentiate from the sibling tool 'get_flow_results' or explain what constitutes a 'collection flow' in this domain.

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?

There is no guidance on when to use this tool versus alternatives like 'get_flow_results', 'list_flows', or 'cancel_flow'. It does not mention prerequisites (e.g., needing a flow_id from list_flows first) or when polling is appropriate.

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