list_workflows
Retrieve all registered workflows from the Hatchet MCP Server to monitor and debug workflow execution, including IDs, names, and descriptions.
Instructions
List all registered Hatchet workflows.
Returns a list of workflows with their IDs, names, and descriptions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/hatchet_mcp/server.py:67-80 (handler)The `list_workflows` tool is implemented as an async function decorated with `@mcp.tool()`. It uses the Hatchet client to fetch workflows and serializes them using `_serialize_workflow`.
@mcp.tool() async def list_workflows() -> list[dict]: """ List all registered Hatchet workflows. Returns a list of workflows with their IDs, names, and descriptions. """ try: hatchet = get_hatchet_client() workflows = await hatchet.workflows.aio_list() return [_serialize_workflow(w) for w in (workflows.rows or [])] except Exception as e: return [{"error": str(e)}]