import { getWorkflow, } from "../../../usecases/mcp/getWorkflow.usecase.js";
export function createGetWorkflowHandler(deps) {
    return (args) => {
        const jobId = args.jobId;
        if (typeof jobId !== "string" || !jobId) {
            return {
                content: [{ type: "text", text: "Error: jobId is required" }],
                isError: true,
            };
        }
        const result = getWorkflow(jobId, deps);
        if (!result.success) {
            return {
                content: [{ type: "text", text: `Error: ${result.error}` }],
                isError: true,
            };
        }
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(result.workflow, null, 2),
                },
            ],
        };
    };
}
//# sourceMappingURL=getWorkflow.handler.js.map