party_mode
Get diverse expert perspectives by having legendary figures discuss your question together in an authentic group conversation format.
Instructions
Activate Party Mode - multiple legendary figures discuss your question together!
How it works:
Ask a question about any topic
Party mode selects relevant legends (or you can specify)
Each legend responds in their authentic voice
Get diverse perspectives from multiple experts
Use this when:
You want multiple viewpoints on a complex topic
You're making a big decision and want varied advice
You want to see how different thinkers approach a problem
You want an engaging group discussion format
Examples:
"What makes a great startup founder?" → Panel of founders discuss
"Is Bitcoin a good investment?" → Crypto experts + traditional investors debate
"How do you build company culture?" → Tech leaders share perspectives
DISCLAIMER: AI personas for educational purposes only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | The question or topic for the legends to discuss | |
| legends | No | Optional: Specific legend IDs to include (e.g., ["elon-musk", "warren-buffett"]) | |
| category | No | Optional: Filter legends by category | |
| max_legends | No | Optional: Maximum legends to include (default: 3, max: 5) |
Implementation Reference
- src/tools/party-mode.ts:103-162 (handler)Core handler function that implements the logic for the 'party_mode' tool: selects relevant legends, builds participant info, discussion prompt, and format guide.export function partyMode(input: PartyModeInput): PartyModeResponse { const { sanitized: question } = sanitizeContext(input.question); const maxLegends = Math.min(input.max_legends || 3, 5); // Determine which legends to include let legendIds: string[]; if (input.legends?.length) { // User specified legends legendIds = input.legends.slice(0, maxLegends); } else if (input.category) { // Filter by category const categoryLegends = TOPIC_LEGEND_MAP[input.category.toLowerCase()]; legendIds = categoryLegends ? categoryLegends.slice(0, maxLegends) : selectLegendsForQuestion(question, maxLegends); } else { // Auto-select based on question legendIds = selectLegendsForQuestion(question, maxLegends); } // Build participants list const participants = legendIds.map(id => { const legend = getLegendById(id); if (!legend) return null; return { legend_id: legend.id, name: legend.name, perspective_hint: getPerspectiveHint(legend), expertise: (legend.owns || []).slice(0, 5), }; }).filter((p): p is NonNullable<typeof p> => p !== null); if (participants.length === 0) { throw new Error('No valid legends found for party mode. Check legend IDs or try a different category.'); } // Build discussion prompt const discussionPrompt = buildDiscussionPrompt(participants, question); return { question: escapeBackticks(question), participants, discussion_prompt: discussionPrompt, format_guide: ` ## Party Mode Discussion Format For each legend, respond AS that person: ${participants.map((p, i) => `### ${i + 1}. ${p.name} [Respond in their voice, using their frameworks and vocabulary] `).join('\n')} ### Synthesis [Optionally summarize key agreements/disagreements] --- *Remember: Each legend should sound distinct and true to their character.* `, }; }
- src/tools/party-mode.ts:226-272 (schema)MCP tool schema definition for 'party_mode', including input schema, description, and tool metadata used for registration.export const partyModeTool = { name: 'party_mode', description: `Activate Party Mode - multiple legendary figures discuss your question together! **How it works:** 1. Ask a question about any topic 2. Party mode selects relevant legends (or you can specify) 3. Each legend responds in their authentic voice 4. Get diverse perspectives from multiple experts **Use this when:** - You want multiple viewpoints on a complex topic - You're making a big decision and want varied advice - You want to see how different thinkers approach a problem - You want an engaging group discussion format **Examples:** - "What makes a great startup founder?" → Panel of founders discuss - "Is Bitcoin a good investment?" → Crypto experts + traditional investors debate - "How do you build company culture?" → Tech leaders share perspectives DISCLAIMER: AI personas for educational purposes only.`, inputSchema: { type: 'object' as const, properties: { question: { type: 'string', description: 'The question or topic for the legends to discuss', }, legends: { type: 'array', items: { type: 'string' }, description: 'Optional: Specific legend IDs to include (e.g., ["elon-musk", "warren-buffett"])', }, category: { type: 'string', enum: ['crypto', 'defi', 'investing', 'value', 'growth', 'venture', 'startup', 'founder', 'ai', 'product', 'philosophy'], description: 'Optional: Filter legends by category', }, max_legends: { type: 'number', description: 'Optional: Maximum legends to include (default: 3, max: 5)', }, }, required: ['question'], }, };
- src/tools/index.ts:12-31 (registration)Registration of the 'party_mode' tool by importing partyModeTool and including it in the allTools array, which is returned by ListToolsRequestHandler.// All tool definitions for registration import { listLegendsTool } from './list-legends.js'; import { summonLegendTool } from './summon-legend.js'; import { getLegendContextTool } from './get-legend-context.js'; import { getLegendInsightTool } from './get-legend-insight.js'; import { searchLegendsTool } from './search-legends.js'; import { partyModeTool } from './party-mode.js'; import { autoMatchTool } from './auto-match.js'; import { suggestTool } from './suggest.js'; export const allTools = [ suggestTool, // First! Claude should see this first for proactive use listLegendsTool, summonLegendTool, getLegendContextTool, getLegendInsightTool, searchLegendsTool, partyModeTool, autoMatchTool, ];
- src/index.ts:190-223 (handler)MCP CallToolRequestHandler case for 'party_mode' that validates input, calls the partyMode handler, formats output, and handles errors.case 'party_mode': { const input = args as { question: string; legends?: string[]; category?: string; max_legends?: number; }; if (!input.question) { return { content: [{ type: 'text', text: 'Error: question parameter is required' }], isError: true, }; } try { const result = partyMode(input); const formatted = formatPartyMode(result); return { content: [{ type: 'text', text: formatted }], }; } catch (error) { return { content: [ { type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
- src/tools/party-mode.ts:192-223 (helper)Helper function to format the PartyModeResponse into a readable markdown string for the tool output.export function formatPartyMode(response: PartyModeResponse): string { const lines: string[] = [ '# Party Mode Activated', '', `**Question:** ${response.question}`, '', '## Participants', '', ]; response.participants.forEach((p, i) => { lines.push(`${i + 1}. **${p.name}**`); lines.push(` - ${p.perspective_hint}`); lines.push(` - Expertise: ${p.expertise.join(', ') || 'General wisdom'}`); lines.push(''); }); lines.push('---'); lines.push(''); lines.push('## Discussion Prompt'); lines.push(''); lines.push('```'); lines.push(escapeBackticks(response.discussion_prompt)); lines.push('```'); lines.push(''); lines.push(response.format_guide); lines.push(''); lines.push('---'); lines.push('*DISCLAIMER: AI personas for educational purposes. Not affiliated with real individuals.*'); return lines.join('\n'); }