Skip to main content
Glama

get_legend_insight

Extract actionable wisdom from legendary founders and investors on specific business topics like hiring, fundraising, or product development.

Instructions

Get a quick insight or wisdom snippet from a legendary founder/investor. Returns formatted wisdom in the style of a thought leader.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
legend_idYesID of the legend (e.g., "elon-musk", "warren-buffett", "cz-binance")
topicNoOptional topic to get insight about (e.g., "hiring", "fundraising", "product")

Implementation Reference

  • Core handler function that fetches legend data, selects a random quote and framework (filtered by optional topic), and formats a markdown insight block with disclaimer.
    export function getLegendInsight( input: GetLegendInsightInput ): GetLegendInsightResult { const legend = getLegendById(input.legend_id); if (!legend) { return { content: `Legend "${input.legend_id}" not found. Use list_legends to see available legends.`, isError: true, }; } // Use static insights if available, otherwise build from YAML const insights = LEGEND_INSIGHTS[input.legend_id] || buildDynamicInsights(legend); // Filter by topic if provided let quotes = insights.quotes; let frameworks = insights.frameworks; if (input.topic) { const topicLower = input.topic.toLowerCase(); // Try to find topic-relevant quotes/frameworks const filteredQuotes = quotes.filter(q => q.toLowerCase().includes(topicLower)); const filteredFrameworks = frameworks.filter(f => f.toLowerCase().includes(topicLower)); // Also search in legend's principles and patterns for topic if (filteredQuotes.length === 0 && legend.principles?.length) { const topicPrinciples = legend.principles.filter(p => p.toLowerCase().includes(topicLower)); if (topicPrinciples.length > 0) { quotes = topicPrinciples; } } if (filteredFrameworks.length === 0 && legend.patterns?.length) { const topicPatterns = legend.patterns .filter(p => p.name.toLowerCase().includes(topicLower) || p.description.toLowerCase().includes(topicLower)) .map(p => `**${p.name}**: ${p.description}`); if (topicPatterns.length > 0) { frameworks = topicPatterns; } } // Use filtered if we found matches if (filteredQuotes.length > 0) quotes = filteredQuotes; if (filteredFrameworks.length > 0) frameworks = filteredFrameworks; } // Pick a random quote and framework const randomQuote = quotes[Math.floor(Math.random() * quotes.length)]; const randomFramework = frameworks[Math.floor(Math.random() * frameworks.length)]; const topicNote = input.topic ? `\n\n*Topic: ${input.topic}*` : ''; const disclaimer = legend.disclaimer || 'AI persona for educational purposes. Not affiliated with the real person.'; const insightBlock = ` # ${legend.name}'s Insight${topicNote} "${randomQuote}" ${randomFramework} --- *Want more? Use \`summon_legend\` to have a full conversation.* *${disclaimer}* `; return { content: insightBlock.trim(), }; }
  • Tool schema definition including name, description, and input schema with required legend_id and optional topic.
    export const getLegendInsightTool = { name: 'get_legend_insight', description: 'Get a quick insight or wisdom snippet from a legendary founder/investor. Returns formatted wisdom in the style of a thought leader.', inputSchema: { type: 'object' as const, properties: { legend_id: { type: 'string', description: 'ID of the legend (e.g., "elon-musk", "warren-buffett", "cz-binance")', }, topic: { type: 'string', description: 'Optional topic to get insight about (e.g., "hiring", "fundraising", "product")', }, }, required: ['legend_id'], }, };
  • src/index.ts:158-170 (registration)
    MCP server request handler registration for 'get_legend_insight' tool, which calls the getLegendInsight function and formats the response.
    case 'get_legend_insight': { const input = args as { legend_id: string; topic?: string; }; const result = getLegendInsight(input); return { content: [{ type: 'text', text: result.content }], ...(result.isError && { isError: true }), }; }
  • Re-export of getLegendInsightTool and inclusion in allTools array for MCP tool list registration.
    export const allTools = [ suggestTool, // First! Claude should see this first for proactive use listLegendsTool, summonLegendTool, getLegendContextTool, getLegendInsightTool, searchLegendsTool, partyModeTool, autoMatchTool, ];
  • Helper function to dynamically generate insights from legend's principles and patterns when no static insights are predefined.
    function buildDynamicInsights(legend: LegendSkill): { quotes: string[]; frameworks: string[] } { const quotes: string[] = []; const frameworks: string[] = []; // Pull principles as quotes if (legend.principles?.length) { quotes.push(...legend.principles.slice(0, 5)); } // Pull patterns as frameworks if (legend.patterns?.length) { frameworks.push( ...legend.patterns.slice(0, 4).map(p => `**${p.name}**: ${p.description}`) ); } // Fallback to defaults if empty if (quotes.length === 0) { quotes.push(...DEFAULT_INSIGHTS.quotes); } if (frameworks.length === 0) { frameworks.push(...DEFAULT_INSIGHTS.frameworks); } return { quotes, frameworks }; }

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