@snahrup/notion-hero-image-mcp
Version:
AI-powered animated hero banner generator for Notion pages. Integrates DALL-E 3, Google Veo 3, Cloudinary CDN, and Notion API.
78 lines • 3.51 kB
JavaScript
const definition = {
name: 'preview_banner_creation',
description: 'Preview the banner creation plan with detailed Veo animation format before executing',
inputSchema: {
type: 'object',
properties: {
page_name: {
type: 'string',
description: 'Name of the Notion page'
},
user_request: {
type: 'string',
description: 'Your natural language request for the banner'
},
style_preference: {
type: 'string',
description: 'Preferred visual style',
enum: ['cinematic', 'illustration', 'photorealistic', 'cyberpunk', 'minimalist', 'fantasy'],
default: 'cinematic'
}
},
required: ['page_name', 'user_request']
}
};
const generatePreviewBeats = () => {
return [
{ timeRange: "00:00 – 00:15", description: "Ambient low-light, establishing atmosphere" },
{ timeRange: "00:16 – 02:00", description: "Primary elements activate with gentle glow/movement" },
{ timeRange: "02:01 – 04:00", description: "Central focus pulses, energy converges" },
{ timeRange: "04:01 – 06:00", description: "Energy flows outward through secondary elements" },
{ timeRange: "06:01 – 07:15", description: "All elements gradually return to rest state" },
{ timeRange: "07:16 – 08:00", description: "Match first frame for seamless loop" }
];
};
const handler = {
'tools/call': async (request) => {
if (request.params.name !== 'preview_banner_creation')
return null;
const { page_name, user_request, style_preference = 'cinematic' } = request.params.arguments;
const animationBeats = generatePreviewBeats();
const beatsFormatted = animationBeats.map(beat => `${beat.timeRange} ${beat.description}`).join('\n');
const preview = {
veo_format: {
title: `"${page_name} Hero Banner Animation"`,
reference_image: "[Generated with DALL-E 3]",
duration: "8 seconds, 30 fps, seamless loop",
aspect_ratio: "16 × 9 (banner-safe center band 1280 × 480)",
audio: "none",
scene_description: `[AI will enhance: ${user_request}]`,
animation_beats: beatsFormatted,
style_tags: `${style_preference}, ultra-detailed, subtle motion, banner-friendly, seamless-loop`,
notes: [
"First and last frames identical for loop",
"Smooth ease curves for all transitions",
"Optimized for Notion banner display",
"Subtle motion suitable for background use"
]
},
pipeline_steps: [
"1. Search Notion for page",
"2. Generate hero image with DALL-E 3",
"3. Create 8-second animation with Google Veo 3",
"4. Convert to optimized GIF (<10MB)",
"5. Upload to Cloudinary CDN",
"6. Set as Notion page cover"
],
estimated_time: "60-90 seconds"
};
return {
content: [{
type: 'text',
text: JSON.stringify(preview, null, 2)
}]
};
}
};
export default { definition, handler };
//# sourceMappingURL=preview-banner-creation.js.map