UNPKG

sia-vision-mcp-server

Version:

Enhanced v2 MCP server with improved error handling, validation, and comprehensive tool schemas for SIA.Vision storytelling platform

603 lines (566 loc) 21.4 kB
/** * MCP Prompts for SIA.Vision * Guided creative workflow prompts for LLM assistance */ // Enhanced Story Development Prompts export const storyPrompts = [ { name: 'generate-story-concept', description: 'Generate a comprehensive story concept based on provided parameters', arguments: [ { name: 'genre', description: 'Genre of the story', required: true, }, { name: 'theme', description: 'Central theme or message', required: true, }, { name: 'target_audience', description: 'Target audience for the story', required: true, }, { name: 'story_length', description: 'Desired length of the story', required: false, }, ], }, { name: 'develop-story-structure', description: 'Develop a story structure based on the provided concept and genre', arguments: [ { name: 'story_concept', description: 'Story concept to develop', required: true, }, { name: 'genre', description: 'Genre of the story', required: true, }, { name: 'structure_type', description: 'Type of story structure: three_act, hero_journey, etc.', required: false, }, ], }, { name: 'create-story-outline', description: 'Create a detailed story outline based on the developed structure', arguments: [ { name: 'story_structure', description: 'Story structure to outline', required: true, }, { name: 'outline_level', description: 'Level of detail: high, medium, low', required: false, }, ], }, ]; // Enhanced Character Development Prompts export const characterPrompts = [ { name: 'generate-character-profile', description: 'Generate a comprehensive character profile based on provided parameters', arguments: [ { name: 'character_type', description: 'Type of character: protagonist, antagonist, supporting', required: true, }, { name: 'character_traits', description: 'Desired traits and characteristics', required: true, }, { name: 'backstory', description: 'Character backstory and history', required: false, }, ], }, { name: 'develop-character-arc', description: 'Develop a character arc based on the provided profile and story structure', arguments: [ { name: 'character_profile', description: 'Character profile to develop', required: true, }, { name: 'story_structure', description: 'Story structure to integrate with', required: true, }, { name: 'arc_type', description: 'Type of character arc: hero_journey, tragic_fall, etc.', required: false, }, ], }, { name: 'create-character-dialogue', description: 'Create authentic dialogue for a character based on their profile and relationships', arguments: [ { name: 'character_id', description: 'ID of the character to create dialogue for', required: true, }, { name: 'scene_context', description: 'Context or situation for the dialogue', required: true, }, { name: 'dialogue_purpose', description: 'Purpose: conflict, exposition, character_development, plot_advancement', required: false, }, ], }, ]; // Enhanced World-Building and Content Prompts export const worldBuildingPrompts = [ { name: 'generate-world-concept', description: 'Generate a comprehensive world concept based on provided parameters', arguments: [ { name: 'world_type', description: 'Type of world: fantasy, sci-fi, historical', required: true, }, { name: 'world_traits', description: 'Desired traits and characteristics', required: true, }, { name: 'geography', description: 'Geography and climate of the world', required: false, }, ], }, { name: 'develop-world-history', description: 'Develop a rich history for the world based on the provided concept', arguments: [ { name: 'world_concept', description: 'World concept to develop', required: true, }, { name: 'history_type', description: 'Type of history: linear, branching, cyclical', required: false, }, ], }, { name: 'create-world-content', description: 'Create detailed content for the world based on the developed history', arguments: [ { name: 'world_history', description: 'World history to create content for', required: true, }, { name: 'content_type', description: 'Type of content: cultures, locations, events', required: false, }, ], }, { name: 'action-sequence-design', description: 'Create engaging action sequences with clear choreography', arguments: [ { name: 'action_type', description: 'Type of action (fight, chase, escape, etc.)', required: true, }, { name: 'stakes', description: 'What characters stand to gain or lose', required: true, }, { name: 'environment', description: 'Setting and environmental factors', required: false, }, ], }, ]; // Genre-Specific Prompts export const genrePrompts = [ { name: 'horror-atmosphere', description: 'Build tension and fear through atmosphere and pacing', arguments: [ { name: 'fear_type', description: 'Type of fear to evoke (psychological, supernatural, body horror, etc.)', required: true, }, { name: 'escalation_pattern', description: 'How tension should build throughout the story', required: false, }, ], }, { name: 'comedy-timing', description: 'Develop comedic timing and humor that serves the story', arguments: [ { name: 'humor_style', description: 'Style of humor (witty banter, physical comedy, situational, etc.)', required: true, }, { name: 'story_balance', description: 'How comedy balances with dramatic elements', required: false, }, ], }, { name: 'mystery-clue-placement', description: 'Design fair and engaging mystery clue progression', arguments: [ { name: 'mystery_solution', description: 'The solution to the mystery', required: true, }, { name: 'red_herrings', description: 'False clues to include for misdirection', required: false, }, ], }, ]; // Creative Workflow Prompts export const workflowPrompts = [ { name: 'brainstorm-session', description: 'Structured brainstorming for creative breakthroughs', arguments: [ { name: 'focus_area', description: 'What to brainstorm (plot twists, character names, world details, etc.)', required: true, }, { name: 'constraints', description: 'Creative constraints to work within', required: false, }, { name: 'inspiration_sources', description: 'Existing works or concepts for inspiration', required: false, }, ], }, { name: 'story-problem-solving', description: 'Solve specific narrative problems and plot holes', arguments: [ { name: 'problem_description', description: 'The specific story problem to solve', required: true, }, { name: 'story_context', description: 'Relevant story context and constraints', required: true, }, { name: 'solution_preferences', description: 'Preferred types of solutions or approaches', required: false, }, ], }, { name: 'adaptation-guidance', description: 'Guide adaptation between different media formats', arguments: [ { name: 'source_format', description: 'Original format (book, short story, etc.)', required: true, }, { name: 'target_format', description: 'Target format (screenplay, series, etc.)', required: true, }, { name: 'key_elements', description: 'Essential elements that must be preserved', required: false, }, ], }, ]; // Combine all prompts export const allPrompts = [ ...storyPrompts, ...characterPrompts, ...worldBuildingPrompts, ...workflowPrompts, // MCP operational prompts { name: 'storyworld-operations', description: 'Operate within a storyworld using MCP tools safely and efficiently', arguments: [ { name: 'storyworld_id', description: 'Target storyworld id', required: true }, { name: 'goal', description: 'High-level goal (e.g., add episode, link character, tidy hierarchy)', required: true } ] }, { name: 'hierarchy-navigation', description: 'Map and navigate the storyworld hierarchy to locate or create nodes', arguments: [ { name: 'storyworld_id', description: 'Target storyworld id', required: true }, { name: 'focus', description: 'What to find or organize (series/episode/scene)', required: false } ] }, { name: 'scene-continuous-writer', description: 'Continuously research and write into a scene document safely via patches', arguments: [ { name: 'scene_node_id', description: 'Scene node id to write into', required: true }, { name: 'research_focus', description: 'Research focus (facts, tone, references)', required: false }, { name: 'writing_goal', description: 'What to accomplish in this session', required: true } ] }, { name: 'scene-writing-plan', description: 'Generate a structured plan with concrete tool calls for scene writing workflow', arguments: [ { name: 'scene_node_id', description: 'Scene node id to write into', required: true }, { name: 'writing_goal', description: 'What to accomplish (e.g., write dialogue, add description)', required: true }, { name: 'research_needed', description: 'What research or context is needed', required: false } ] } ]; // Prompt content mapping with detailed instructions export const promptContent = { 'develop-story-concept': `You are an expert story development consultant. Help develop a comprehensive story concept using the following structured approach: 1. **Core Concept Analysis** - Identify the central premise and unique hook - Analyze genre conventions and opportunities for innovation - Define the target audience and their expectations 2. **Thematic Foundation** - Explore the deeper themes and messages - Connect themes to character arcs and plot events - Ensure thematic consistency throughout the narrative 3. **Story Structure Planning** - Choose appropriate structure for the format and genre - Map major plot points and turning moments - Balance character development with plot progression 4. **Audience Engagement Strategy** - Identify emotional hooks for the target audience - Plan moments of tension, relief, and payoff - Consider format-specific engagement techniques Provide specific, actionable recommendations that enhance the story's commercial and artistic potential.`, 'character-deep-dive': `You are a character development specialist. Create a comprehensive character profile using psychological depth and narrative function: 1. **Core Identity** - Fundamental personality traits and worldview - Core beliefs, values, and moral code - Unique voice and behavioral patterns 2. **Psychological Foundation** - Formative experiences and backstory wounds - Internal conflicts and contradictions - Fears, desires, and hidden motivations 3. **Narrative Function** - Role in advancing plot and themes - Relationships with other characters - Character arc and transformation journey 4. **Authentic Details** - Specific mannerisms and speech patterns - Cultural background and social context - Skills, talents, and areas of expertise Focus on creating a character who feels like a real person with agency, complexity, and clear narrative purpose.`, 'world-expansion': `You are a world-building expert. Expand the fictional world with rich, interconnected details: 1. **Logical Consistency** - Ensure new elements fit existing world rules - Consider cause-and-effect relationships - Maintain internal logic and believability 2. **Cultural Depth** - Develop authentic social structures and customs - Create believable conflicts and tensions - Show how environment shapes culture 3. **Story Integration** - Connect world details to plot and character needs - Create opportunities for conflict and drama - Enhance thematic resonance through world elements 4. **Sensory Richness** - Provide vivid sensory details - Create distinctive atmospheres and moods - Make the world feel lived-in and authentic Build a world that serves the story while feeling complete and immersive.`, 'scene-enhancement': `You are a scene writing specialist. Enhance the scene with improved pacing, dialogue, and emotional impact: 1. **Scene Structure** - Clear beginning, middle, and end - Rising tension and satisfying resolution - Smooth transitions and natural flow 2. **Character Voice** - Distinctive dialogue for each character - Subtext and unspoken emotions - Realistic speech patterns and rhythms 3. **Sensory Engagement** - Vivid descriptions that serve the mood - Environmental details that enhance atmosphere - Physical actions that reveal character 4. **Narrative Function** - Advance plot and character development - Reveal important information naturally - Create emotional resonance with readers Transform the scene into a compelling, memorable moment that serves the larger story.`, 'brainstorm-session': `You are a creative brainstorming facilitator. Guide an innovative ideation session: 1. **Divergent Thinking** - Generate multiple creative possibilities - Encourage wild and unconventional ideas - Build on and combine different concepts 2. **Constraint-Based Creativity** - Use limitations as creative catalysts - Find innovative solutions within boundaries - Transform obstacles into opportunities 3. **Association and Connection** - Link disparate concepts and ideas - Find unexpected relationships and patterns - Draw inspiration from diverse sources 4. **Practical Evaluation** - Assess ideas for story potential - Consider implementation challenges - Identify the most promising concepts for development Create a dynamic, productive brainstorming experience that generates actionable creative solutions.`, 'storyworld-operations': `You are an MCP-savvy assistant working inside a specific storyworld. Follow the operational playbook strictly. Operational plan: - Discover tools and schemas first if unknown. - Fetch hierarchy: call get_content_hierarchy(storyworldId) to understand structure. - Only then create/move: node_create, reorder_nodes, move_node. - For doc edits: document_ensure then get_document_view/apply_document_patch with version test. - Prefer incremental changes; reflect back IDs you used. When you propose actions, list the concrete tool calls you will make with minimal arguments. Avoid destructive operations unless explicitly asked.`, 'hierarchy-navigation': `You are a surgical navigator for the storyworld hierarchy. Steps: 1) Call get_content_hierarchy(storyworldId) and summarize series episodes scenes. 2) Identify gaps to achieve the focus (e.g., missing episode or scene). 3) Propose minimal node_create/move_node/reorder_nodes operations (include parentId and titles). 4) Output a short plan with expected IDs to retrieve (no guesses) and follow-up reads.`, 'scene-continuous-writer': `You are a careful scene writer using JSON Patch. Work in small, safe increments. Rules: - Ensure document exists for the scene (document_ensure). - Read current content and version (get_document_view). - Draft small additions or revisions; then apply_document_patch with a 'test' op on the current version followed by 'add'/'replace'. - After patch, re-read if further edits are needed. - If patch conflicts, re-read and rebase once, otherwise stop and report. Focus the writing to satisfy the goal. Keep consistent character voices and continuity.`, 'scene-writing-plan': `You are a strategic scene writing planner. Generate a concrete, actionable plan with specific tool calls for scene writing. **Planning Process:** 1. **Context Gathering** - What do you need to know before writing? 2. **Research Phase** - What information should be gathered? 3. **Writing Phase** - What specific content to add/modify? 4. **Tool Call Sequence** - Exact tool calls with arguments **Output Format:** Provide a structured plan with concrete tool calls like this: \`\`\`json { "plan": "Step-by-step description of your approach", "tool_calls": [ { "step": 1, "description": "What this call accomplishes", "tool": "tool_name", "arguments": { "param1": "value1", "param2": "value2" } } ] } \`\`\` **Available Tools:** - document_ensure: Ensure scene has a document - get_document_view: Read current content and version - apply_document_patch: Apply changes with version control - get_related_nodes: Get character/location context - get_content_hierarchy: Understand scene position **Example Plan:** For writing character dialogue in a coffee shop scene: \`\`\`json { "plan": "Write natural dialogue between Sarah and John in their first meeting", "tool_calls": [ { "step": 1, "description": "Ensure the scene has a document for editing", "tool": "document_ensure", "arguments": { "nodeId": "scene_123" } }, { "step": 2, "description": "Read current scene content and get version for patching", "tool": "get_document_view", "arguments": { "document_id": "doc_456" } }, { "step": 3, "description": "Get character details for authentic dialogue", "tool": "get_related_nodes", "arguments": { "nodeId": "scene_123", "relType": "character_appears_in", "includeContent": true } }, { "step": 4, "description": "Apply dialogue content with version test", "tool": "apply_document_patch", "arguments": { "document_id": "doc_456", "version": 5, "ops": [ { "op": "test", "path": "/version", "value": 5 }, { "op": "add", "path": "/content/0", "value": { "type": "paragraph", "content": [{"type": "text", "text": "SARAH: Hi, I'm Sarah. You must be John."}] }} ] } } ] } \`\`\` Focus on creating a clear, executable sequence of tool calls that achieves the writing goal efficiently.` }; //# sourceMappingURL=index.js.map