feat: add create workflow tool in MCP

This commit is contained in:
Abhishek Kumar 2026-04-25 17:38:38 +05:30
parent d6567eef28
commit 3e3773f400
13 changed files with 245 additions and 94 deletions

View file

@ -18,12 +18,10 @@ from fastapi import HTTPException
from api.db import db_client
from api.mcp_server.auth import authenticate_mcp_request
from api.mcp_server.server import mcp
from api.mcp_server.tracing import traced_tool
from api.mcp_server.ts_bridge import TsBridgeError, generate_code
@mcp.tool
@traced_tool
async def get_workflow_code(workflow_id: int) -> dict[str, Any]:
"""Return the workflow as SDK TypeScript code the LLM can edit.