MCPcopy
hub / github.com/Skyvern-AI/skyvern / list_tasks

Function list_tasks

skyvern/cli/tasks.py:57–77  ·  view source on GitHub ↗

List tasks for a workflow run. Examples: skyvern tasks list --workflow-run-id wr_abc123 skyvern tasks list --workflow-run-id wr_abc123 --json

(
    ctx: typer.Context,
    workflow_run_id: str = typer.Option(..., "--workflow-run-id", "-r", help="Workflow run ID"),
    json_output: bool = typer.Option(False, "--json", help="Output as JSON."),
)

Source from the content-addressed store, hash-verified

55
56@tasks_app.command("list")
57def list_tasks(
58 ctx: typer.Context,
59 workflow_run_id: str = typer.Option(..., "--workflow-run-id", "-r", help="Workflow run ID"),
60 json_output: bool = typer.Option(False, "--json", help="Output as JSON."),
61) -> None:
62 """List tasks for a workflow run.
63
64 Examples:
65 skyvern tasks list --workflow-run-id wr_abc123
66 skyvern tasks list --workflow-run-id wr_abc123 --json
67 """
68 client = _get_client(ctx.obj.get("api_key") if ctx.obj else None)
69 try:
70 tasks = _list_workflow_tasks(client, workflow_run_id)
71 except Exception as e:
72 output_error(f"Failed to list tasks: {e}", action="tasks.list", json_mode=json_output)
73
74 if json_output:
75 output(tasks, action="tasks.list", json_mode=True)
76 else:
77 console.print(Panel(json.dumps(tasks, indent=2), border_style="cyan"))

Callers

nothing calls this directly

Calls 6

output_errorFunction · 0.90
outputFunction · 0.90
_list_workflow_tasksFunction · 0.85
dumpsMethod · 0.80
_get_clientFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected