Skip to main content
Glama

get_legend_context

Retrieve detailed profiles of legendary founders and investors to understand their identities, communication styles, core principles, decision-making frameworks, and practical use cases for educational purposes.

Instructions

Get EXTREMELY DETAILED information about a legendary founder or investor.

This tool provides:

  • Full identity - Who they are, their background, their worldview

  • Voice & style - How they communicate, characteristic phrases

  • Core principles - Their fundamental beliefs and values

  • Thinking frameworks - Step-by-step methods they use for decisions

  • Anti-patterns - What they would NEVER do

  • Example conversations - See them respond in character

  • Use cases - When to consult this legend

Formats available:

  • full - Everything (recommended for deep understanding)

  • frameworks - Just their thinking methods

  • principles - Just their beliefs

  • voice - Just their communication style

  • examples - Just sample conversations

  • system_prompt - For custom AI integrations

  • markdown - Readable overview

DISCLAIMER: AI personas for educational purposes only. Not affiliated with real individuals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
legend_idYesThe legend ID (e.g., "elon-musk", "warren-buffett", "steve-jobs")
formatNoOutput format (default: "full" for maximum detail)full
include_relatedNoInclude related legends with complementary perspectives

Implementation Reference

  • Core handler function that retrieves a legend by ID, formats its context according to the specified format (full, markdown, frameworks, etc.), computes metadata, and optionally includes related legends.
    export function getLegendContext(input: GetLegendContextInput): LegendContext { const legend = getLegendById(input.legend_id); if (!legend) { throw new Error( `Legend "${input.legend_id}" not found. Use list_legends to see available legends.` ); } const format = input.format || 'full'; let content: string; switch (format) { case 'full': content = formatFullLegendContext(legend); break; case 'system_prompt': content = buildLegendSystemPrompt(legend); break; case 'frameworks': content = formatFrameworks(legend); break; case 'principles': content = formatPrinciples(legend); break; case 'voice': content = formatVoice(legend); break; case 'examples': content = formatExamples(legend); break; case 'markdown': default: content = formatLegendMarkdown(legend); break; } const result: LegendContext = { legend_id: legend.id, name: legend.name, format, content, metadata: { expertise: legend.owns || [], tags: legend.tags || [], framework_count: legend.patterns?.length || 0, principle_count: legend.principles?.length || 0, example_count: legend.examples?.length || 0, }, }; // Add related legends if requested if (input.include_related) { result.related_legends = findRelatedLegends(legend); } return result; }
  • MCP tool definition including name, detailed description, and inputSchema for validation of parameters: legend_id (required), format, include_related.
    export const getLegendContextTool = { name: 'get_legend_context', description: `Get EXTREMELY DETAILED information about a legendary founder or investor. This tool provides: - **Full identity** - Who they are, their background, their worldview - **Voice & style** - How they communicate, characteristic phrases - **Core principles** - Their fundamental beliefs and values - **Thinking frameworks** - Step-by-step methods they use for decisions - **Anti-patterns** - What they would NEVER do - **Example conversations** - See them respond in character - **Use cases** - When to consult this legend Formats available: - \`full\` - Everything (recommended for deep understanding) - \`frameworks\` - Just their thinking methods - \`principles\` - Just their beliefs - \`voice\` - Just their communication style - \`examples\` - Just sample conversations - \`system_prompt\` - For custom AI integrations - \`markdown\` - Readable overview DISCLAIMER: AI personas for educational purposes only. Not affiliated with real individuals.`, inputSchema: { type: 'object' as const, properties: { legend_id: { type: 'string', description: 'The legend ID (e.g., "elon-musk", "warren-buffett", "steve-jobs")', }, format: { type: 'string', enum: ['full', 'markdown', 'system_prompt', 'frameworks', 'principles', 'voice', 'examples'], description: 'Output format (default: "full" for maximum detail)', default: 'full', }, include_related: { type: 'boolean', description: 'Include related legends with complementary perspectives', default: false, }, }, required: ['legend_id'], }, };
  • Tool schemas are collected into allTools array, which is returned by listTools MCP handler. getLegendContextTool is included here for registration.
    export const allTools = [ suggestTool, // First! Claude should see this first for proactive use listLegendsTool, summonLegendTool, getLegendContextTool, getLegendInsightTool, searchLegendsTool, partyModeTool, autoMatchTool, ];
  • src/index.ts:113-156 (registration)
    MCP CallToolRequestSchema handler switch case that invokes getLegendContext with parsed arguments, appends metadata/related info to response, and returns formatted text content.
    case 'get_legend_context': { const input = args as { legend_id: string; format?: 'full' | 'markdown' | 'system_prompt' | 'frameworks' | 'principles' | 'voice' | 'examples'; include_related?: boolean; }; try { const result = getLegendContext({ legend_id: input.legend_id, format: input.format || 'full', include_related: input.include_related || false, }); let text = result.content; // Add metadata text += `\n\n---\n**Metadata:**\n`; text += `- Frameworks: ${result.metadata.framework_count}\n`; text += `- Principles: ${result.metadata.principle_count}\n`; text += `- Examples: ${result.metadata.example_count}\n`; if (result.related_legends?.length) { text += `\n**Related Legends:**\n`; result.related_legends.forEach(r => { text += `- ${r.name} (${r.relationship})\n`; }); } return { content: [{ type: 'text', text }], }; } catch (error) { return { content: [ { type: 'text', text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Key helper function that generates the comprehensive markdown-formatted full context for a legend, including all sections: identity, voice, principles, frameworks, anti-patterns, examples, and use cases.
    function formatFullLegendContext(legend: LegendSkill): string { const sections: string[] = []; // Header with full description sections.push(`# ${legend.name}`); sections.push(`*${legend.description}*`); sections.push(''); // Metadata if (legend.owns?.length || legend.tags?.length) { sections.push('## Quick Reference'); if (legend.owns?.length) { sections.push(`**Areas of Expertise:** ${legend.owns.join(', ')}`); } if (legend.tags?.length) { sections.push(`**Tags:** ${legend.tags.join(', ')}`); } sections.push(''); } // Full Identity - the core persona description if (legend.identity) { sections.push('## Identity & Background'); sections.push(legend.identity.trim()); sections.push(''); } // Voice & Communication Style if (legend.voice) { sections.push('## Voice & Communication Style'); sections.push(`**Tone:** ${legend.voice.tone}`); if (legend.voice.style) { sections.push(''); sections.push('**Style Guidelines:**'); sections.push(legend.voice.style); } if (legend.voice.personality?.length) { sections.push(''); sections.push(`**Personality Traits:** ${legend.voice.personality.join(', ')}`); } if (legend.voice.vocabulary?.length) { sections.push(''); sections.push('**Characteristic Vocabulary:**'); legend.voice.vocabulary.forEach(v => sections.push(`- "${v}"`)); } sections.push(''); } // Core Principles - beliefs and values if (legend.principles?.length) { sections.push('## Core Principles & Beliefs'); sections.push('These are the fundamental beliefs that guide their thinking:'); sections.push(''); legend.principles.forEach((p, i) => { sections.push(`${i + 1}. ${p}`); }); sections.push(''); } // Thinking Frameworks - DETAILED if (legend.patterns?.length) { sections.push('## Thinking Frameworks'); sections.push('Use these frameworks to think like this legend:'); sections.push(''); legend.patterns.forEach(p => { sections.push(`### ${p.name}`); sections.push(`*${p.description}*`); if (p.when) { sections.push(''); sections.push(`**When to use:** ${p.when}`); } if (p.steps?.length) { sections.push(''); sections.push('**Steps:**'); p.steps.forEach((s, i) => sections.push(`${i + 1}. ${s}`)); } if (p.example) { sections.push(''); sections.push(`**Example:** ${p.example}`); } sections.push(''); }); } // Anti-Patterns - what they would NEVER do if (legend.anti_patterns?.length) { sections.push('## What They Would NEVER Do'); sections.push('Avoid these patterns when channeling this legend:'); sections.push(''); legend.anti_patterns.forEach(a => { sections.push(`### ${a.pattern || a.name}`); sections.push(`**Why this is wrong:** ${a.why}`); sections.push(`**Instead, they would:** ${a.instead}`); sections.push(''); }); } // Example Conversations if (legend.examples?.length) { sections.push('## Example Conversations'); sections.push('See how they respond in character:'); sections.push(''); legend.examples.forEach((ex, i) => { sections.push(`### Example ${i + 1}`); sections.push(`**User asks:** "${ex.prompt}"`); sections.push(''); sections.push(`**${legend.name} responds:**`); sections.push(`> ${ex.response.split('\n').join('\n> ')}`); sections.push(''); }); } // Best Use Cases sections.push('## When to Consult This Legend'); sections.push(generateUseCases(legend)); sections.push(''); // Disclaimer sections.push('---'); sections.push('*DISCLAIMER: This is an AI persona inspired by public knowledge about this individual. It is not affiliated with, endorsed by, or representative of the real person. Use for educational and entertainment purposes.*'); return sections.join('\n'); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cryptosquanch/legends-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server