@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.
85 lines • 3.43 kB
JavaScript
const definition = {
name: 'create_notion_banner',
description: 'Complete pipeline: Find Notion page by name, generate animated banner with Veo format, and set as cover',
inputSchema: {
type: 'object',
properties: {
page_name: {
type: 'string',
description: 'Name of the Notion page (will search for it)'
},
prompt: {
type: 'string',
description: 'Creative prompt for the hero image'
},
style: {
type: 'string',
description: 'Visual style (cinematic, illustration, photorealistic, cyberpunk)',
default: 'cinematic'
},
custom_animation: {
type: 'object',
description: 'Optional custom animation beats',
properties: {
title: { type: 'string' },
scene_description: { type: 'string' },
animation_beats: {
type: 'array',
items: {
type: 'object',
properties: {
timeRange: { type: 'string' },
description: { type: 'string' }
}
}
},
style_tags: { type: 'string' }
}
},
references: {
type: 'array',
description: 'URLs or descriptions of reference images',
items: { type: 'string' },
default: []
}
},
required: ['page_name', 'prompt']
}
};
const handler = {
'tools/call': async (request) => {
if (request.params.name !== 'create_notion_banner')
return null;
const { page_name, prompt, style = 'cinematic', custom_animation, references = [] } = request.params.arguments;
// This tool coordinates the full pipeline
// In practice, it would:
// 1. Search for Notion page by name
// 2. Call generate_image with prompt and style
// 3. Call generate_video with image and animation details
// 4. Call mp4_to_gif to convert
// 5. Call upload_to_cloudinary
// 6. Call set_notion_cover with page ID and CDN URL
return {
content: [{
type: 'text',
text: JSON.stringify({
message: "Full banner creation pipeline initiated",
steps: [
"1. Searching for Notion page",
"2. Generating hero image with detailed scene",
"3. Creating 8-second Veo animation with timestamped beats",
"4. Converting to optimized GIF",
"5. Uploading to Cloudinary CDN",
"6. Setting as Notion page cover"
],
page_name,
prompt,
style,
animation_format: "Veo 3 detailed format (8 seconds, 30fps, seamless loop)"
})
}]
};
}
};
export default { definition, handler };
//# sourceMappingURL=create-notion-banner.js.map