Skip to main content
Glama

search_legends

Search for tech, investing, and crypto legends by name, expertise, or tags to discover relevant personas for your queries.

Instructions

Search for legends by name, description, expertise, or tags.

Examples:

  • "crypto" → finds CZ, Anatoly, Mert, Michael

  • "investor" → finds Warren Buffett, Charlie Munger, Peter Thiel

  • "first principles" → finds Elon Musk

  • "AI" → finds Sam Altman, Jensen Huang

Use this for query-based discovery when you're not sure which legend to summon.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (matches name, description, tags, expertise)

Implementation Reference

  • The main handler function for the 'search_legends' tool. It processes the input query by calling the legends loader's search function and formats the results into the expected SearchLegendsResult structure.
    export function searchLegends(input: SearchLegendsInput): SearchLegendsResult { const results = searchLegendsLoader(input.query); return { count: results.length, legends: results.map(l => ({ id: l.id, name: l.name, description: l.description, expertise: l.owns || [], tags: l.tags || [], })), }; }
  • TypeScript interfaces defining the input (query string) and output (count and list of matching legends) schemas for the tool.
    export interface SearchLegendsInput { query: string; } export interface SearchLegendsResult { count: number; legends: Array<{ id: string; name: string; description: string; expertise: string[]; tags: string[]; }>; }
  • The tool registration object defining name 'search_legends', description, and inputSchema for MCP tool listing.
    export const searchLegendsTool = { name: 'search_legends', description: `Search for legends by name, description, expertise, or tags. Examples: - "crypto" → finds CZ, Anatoly, Mert, Michael - "investor" → finds Warren Buffett, Charlie Munger, Peter Thiel - "first principles" → finds Elon Musk - "AI" → finds Sam Altman, Jensen Huang Use this for query-based discovery when you're not sure which legend to summon.`, inputSchema: { type: 'object' as const, properties: { query: { type: 'string', description: 'Search query (matches name, description, tags, expertise)', }, }, required: ['query'] as string[], }, };
  • Registration of all tools including searchLegendsTool in the allTools array, used by the MCP server for listTools request.
    export const allTools = [ suggestTool, // First! Claude should see this first for proactive use listLegendsTool, summonLegendTool, getLegendContextTool, getLegendInsightTool, searchLegendsTool, partyModeTool, autoMatchTool, ];
  • Helper function to format search results into a user-friendly markdown response, used in the tool handler.
    export function formatSearchResults(result: SearchLegendsResult, query: string): string { const lines: string[] = []; if (result.count === 0) { lines.push(`# No legends found for "${query}"`); lines.push(''); lines.push('Try a different search term, or use `list_legends` to see all available legends.'); return lines.join('\n'); } lines.push(`# Search Results for "${query}" (${result.count} found)`); lines.push(''); for (const legend of result.legends) { lines.push(`## ${legend.name}`); lines.push(`**ID:** \`${legend.id}\``); lines.push(`*${legend.description}*`); if (legend.expertise.length > 0) { lines.push(`**Expertise:** ${legend.expertise.join(', ')}`); } if (legend.tags.length > 0) { lines.push(`**Tags:** ${legend.tags.join(', ')}`); } lines.push(''); } lines.push('---'); lines.push(''); lines.push('Use `summon_legend` with a legend ID to start a conversation.'); return lines.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