UNPKG

replicate-flux-mcp

Version:
19 lines (18 loc) 529 B
import { replicate } from "../services/replicate.js"; import { handleError } from "../utils/error.js"; export const registerGetPredictionTool = async ({ predictionId, }) => { try { const prediction = await replicate.predictions.get(predictionId); return { content: [ { type: "text", text: JSON.stringify(prediction, null, 2), }, ], }; } catch (error) { return handleError(error); } };