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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_workflows"
}
}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)}]