Skip to main content
Glama
199-mcp

Limitless MCP Server

by 199-mcp

limitless_search_conversations_about

Search all historical conversations from Limitless Pendant recordings using natural language queries, filtering by time, speaker, and content type to find specific discussions.

Instructions

Advanced search across ALL lifelogs (not just recent) with intelligent context, relevance scoring, and comprehensive filtering options. Perfect for finding historical discussions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_termYesText to search for across ALL lifelogs (not just recent ones).
time_expressionNoNatural time range like 'this week', 'past month', 'today' to limit search scope.
speaker_nameNoFilter results to specific speaker/participant.
content_typesNoFilter by content node types like ['heading1', 'heading2', 'blockquote'].
include_contextNoInclude surrounding context for better understanding.
max_resultsNoMaximum number of results to return.
timezoneNoIANA timezone for time calculations.

Implementation Reference

  • src/server.ts:758-794 (registration)
    Tool registration for 'limitless_search_conversations_about', including thin wrapper handler that delegates to the main implementation in AdvancedSearch.searchConversationsAbout
    // Advanced Search Tool
    server.tool("limitless_search_conversations_about",
        "Advanced search across ALL lifelogs (not just recent) with intelligent context, relevance scoring, and comprehensive filtering options. Perfect for finding historical discussions.",
        AdvancedSearchArgsSchema,
        async (args, _extra) => {
            try {
                let timeRange = undefined;
                if (args.time_expression) {
                    const parser = new NaturalTimeParser({ timezone: args.timezone });
                    timeRange = parser.parseTimeExpression(args.time_expression);
                }
                
                const searchOptions: SearchOptions = {
                    includeContext: args.include_context,
                    maxResults: args.max_results,
                    searchInSpeaker: args.speaker_name,
                    searchInContentType: args.content_types,
                    timeRange
                };
                
                const results = await AdvancedSearch.searchConversationsAbout(
                    limitlessApiKey,
                    args.search_term,
                    searchOptions
                );
                
                const resultText = results.length === 0
                    ? `No conversations found about "${args.search_term}".`
                    : `Found ${results.length} relevant conversation(s) about "${args.search_term}":\n\n${JSON.stringify(results, null, 2)}`;
                    
                return { content: [{ type: "text", text: resultText }] };
            } catch (error) {
                const errorMessage = error instanceof Error ? error.message : String(error);
                return { content: [{ type: "text", text: `Error searching conversations: ${errorMessage}` }], isError: true };
            }
        }
    );
  • Core handler function implementing the search logic: fetches lifelogs across time range, identifies relevant content nodes containing the search term (with speaker/content type filters), computes relevance scores, extracts surrounding context, generates summaries, and returns top scored results.
    static async searchConversationsAbout(
        apiKey: string,
        searchTerm: string,
        options: SearchOptions = {}
    ): Promise<TopicSearchResult[]> {
        
        const {
            includeContext = true,
            contextLines = 2,
            maxResults = 20,
            minRelevanceScore = 0.3,
            searchInSpeaker,
            searchInContentType,
            timeRange
        } = options;
    
        // Fetch all relevant lifelogs
        const lifelogParams: any = {};
        if (timeRange) {
            lifelogParams.start = timeRange.start;
            lifelogParams.end = timeRange.end;
            lifelogParams.timezone = timeRange.timezone;
        }
        
        // Use a large limit to search through more history
        lifelogParams.limit = 1000;
        lifelogParams.includeMarkdown = true;
        lifelogParams.includeHeadings = true;
        
        const allLifelogs = await getLifelogs(apiKey, lifelogParams);
        
        const results: TopicSearchResult[] = [];
        const searchTermLower = searchTerm.toLowerCase();
        
        for (const lifelog of allLifelogs) {
            const matchingNodes = this.findRelevantNodes(
                lifelog,
                searchTermLower,
                searchInSpeaker,
                searchInContentType
            );
            
            if (matchingNodes.length === 0) continue;
            
            // Calculate relevance score
            const relevanceScore = this.calculateRelevanceScore(matchingNodes, searchTermLower);
            
            if (relevanceScore < minRelevanceScore) continue;
            
            // Get context if requested
            let contextBefore: LifelogContentNode[] = [];
            let contextAfter: LifelogContentNode[] = [];
            
            if (includeContext && lifelog.contents) {
                const { before, after } = this.extractContext(
                    lifelog.contents,
                    matchingNodes,
                    contextLines
                );
                contextBefore = before;
                contextAfter = after;
            }
            
            results.push({
                lifelog,
                relevantNodes: matchingNodes,
                contextBefore,
                contextAfter,
                relevanceScore,
                summary: this.generateSearchSummary(lifelog, matchingNodes, searchTerm)
            });
        }
        
        // Sort by relevance and return top results
        return results
            .sort((a, b) => b.relevanceScore - a.relevanceScore)
            .slice(0, maxResults);
    }
  • Zod schema defining the input arguments for the tool registration.
    const AdvancedSearchArgsSchema = {
        search_term: z.string().describe("Text to search for across ALL lifelogs (not just recent ones)."),
        time_expression: z.string().optional().describe("Natural time range like 'this week', 'past month', 'today' to limit search scope."),
        speaker_name: z.string().optional().describe("Filter results to specific speaker/participant."),
        content_types: z.array(z.string()).optional().describe("Filter by content node types like ['heading1', 'heading2', 'blockquote']."),
        include_context: z.boolean().optional().default(true).describe("Include surrounding context for better understanding."),
        max_results: z.number().optional().default(20).describe("Maximum number of results to return."),
        timezone: z.string().optional().describe("IANA timezone for time calculations."),
    };
  • TypeScript interface defining options passed to the search handler, mapping from tool args.
    export interface SearchOptions {
        includeContext?: boolean;
        contextLines?: number;
        maxResults?: number;
        minRelevanceScore?: number;
        searchInSpeaker?: string;
        searchInContentType?: string[];
        timeRange?: TimeRange;
    }
  • Helper method to find content nodes in a lifelog matching the search term and filters.
    private static findRelevantNodes(
        lifelog: Lifelog,
        searchTermLower: string,
        searchInSpeaker?: string,
        searchInContentType?: string[]
    ): LifelogContentNode[] {
        if (!lifelog.contents) return [];
        
        return lifelog.contents.filter(node => {
            // Content match
            const hasContentMatch = node.content?.toLowerCase().includes(searchTermLower);
            
            // Speaker filter
            if (searchInSpeaker && node.speakerName !== searchInSpeaker) {
                return false;
            }
            
            // Content type filter
            if (searchInContentType && !searchInContentType.includes(node.type)) {
                return false;
            }
            
            return hasContentMatch;
        });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'advanced search' with 'intelligent context, relevance scoring' but doesn't clarify critical behaviors like whether this is a read-only operation, potential performance impacts of searching 'ALL lifelogs,' rate limits, authentication requirements, or what the output format looks like. For a search tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences: the first states the core functionality with key features, and the second provides usage context. Every phrase adds value, with no redundant information. It could be slightly more front-loaded by leading with 'Search across ALL lifelogs' more explicitly, but it's well-constructed overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, no annotations, no output schema), the description is adequate but incomplete. It clearly explains the purpose and hints at advanced features, but without annotations or output schema, it fails to disclose behavioral aspects like safety, performance, or result format. For a search tool with many parameters and no structured safety hints, more descriptive guidance on limitations or output would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds marginal value by emphasizing the 'ALL lifelogs' scope for the search_term parameter and hinting at 'comprehensive filtering options,' but it doesn't provide additional semantic context beyond what's in the schema descriptions. This meets the baseline of 3 when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs 'advanced search across ALL lifelogs' with specific capabilities like 'intelligent context, relevance scoring, and comprehensive filtering.' It explicitly distinguishes from siblings by emphasizing 'not just recent' and being 'perfect for finding historical discussions,' which differentiates it from tools like limitless_list_recent_lifelogs or limitless_search_lifelogs that might have narrower scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('Perfect for finding historical discussions'), implying it's for comprehensive searches across all lifelogs rather than limited scopes. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, such as when to choose limitless_search_lifelogs instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/199-mcp/mcp-limitless'

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