run_flow
Run a Metaflow workflow from a local Python file. Optionally set parameters, tags, and max workers for parallel execution.
Instructions
Run a Metaflow flow from a local source file.
Starts execution and returns once the run ID is assigned. The flow continues running as a subprocess. Use get_run to monitor progress.
Requires the flow source file on the local filesystem -- only works when the MCP server has access to the flow code (e.g. local dev).
Args: flow_file: Path to the flow Python file (e.g. "./myflow.py"). parameters: Optional flow parameter overrides (e.g. {"learning_rate": "0.01"}). Keys are parameter names. tags: Optional tags to apply to the run. max_workers: Max parallel workers for foreach steps.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"flow_file": "<flow_file>"
},
"name": "run_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow_file | Yes | ||
| parameters | No | ||
| tags | No | ||
| max_workers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |