replicate-flux-mcp
Version:
MCP for Replicate Flux Model
19 lines (18 loc) • 529 B
JavaScript
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);
}
};