Skip to main content
Glama
199-mcp

Limitless MCP Server

by 199-mcp

limitless_search_lifelogs

Search recent lifelog recordings for specific keywords in titles and content, returning matching results from a defined scope of recent entries.

Instructions

Performs a simple text search for specific keywords/phrases within the title and content of recent logs/Pendant recordings. Use ONLY for keywords, NOT for concepts like 'action items' or 'summaries'. Searches only recent logs (limited scope).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_termYesThe text to search for within lifelog titles and content.
fetch_limitNoHow many *recent* lifelogs to fetch from the API to search within (Default: 20, Max: 100). This defines the scope of the search, NOT the number of results returned.
limitNoMaximum number of lifelogs to return per request (Max: 10 per API constraint). Use cursor for pagination.
timezoneNoIANA timezone for date/time parameters (defaults to server's local timezone).
includeMarkdownNoInclude markdown content in the response.
includeHeadingsNoInclude headings content in the response.
isStarredNoFilter for starred lifelogs only.

Implementation Reference

  • The handler function fetches recent lifelogs via getLifelogs API call, performs case-insensitive substring search on log.title and log.markdown, limits results, and returns formatted matches with token limit handling.
    async (args, _extra) => {
        const fetchLimit = args.fetch_limit ?? 20;
        console.error(`[Server Tool] Search initiated for term: "${args.search_term}", fetch_limit: ${fetchLimit}`);
        try {
            const logsToSearch = await getLifelogs(limitlessApiKey, { 
                limit: fetchLimit, 
                direction: 'desc', 
                timezone: args.timezone, 
                includeMarkdown: args.includeMarkdown ?? true, 
                includeHeadings: args.includeHeadings ?? true, 
                isStarred: args.isStarred 
            });
            
            if (logsToSearch.length === 0) {
                return { content: [{ type: "text", text: "No recent lifelogs found to search within." }] };
            }
            
            const searchTermLower = args.search_term.toLowerCase();
            const matchingLogs = logsToSearch.filter(log => 
                log.title?.toLowerCase().includes(searchTermLower) || 
                (log.markdown && log.markdown.toLowerCase().includes(searchTermLower))
            );
            
            const finalLimit = args.limit; // This limit applies to the *results*
            const limitedResults = finalLimit ? matchingLogs.slice(0, finalLimit) : matchingLogs;
            
            if (limitedResults.length === 0) {
                return { content: [{ type: "text", text: `No matches found for "${args.search_term}" within the ${logsToSearch.length} most recent lifelogs searched.` }] };
            }
            
            // Use createSafeResponse to handle token limits
            return createSafeResponse(
                limitedResults,
                `Found ${limitedResults.length} match(es) for "${args.search_term}" within the ${logsToSearch.length} most recent lifelogs searched${finalLimit !== undefined ? ` (displaying up to ${finalLimit})` : ''}`,
                {
                    hasMore: matchingLogs.length > limitedResults.length,
                    totalFetched: logsToSearch.length
                }
            );
        } catch (error) { 
            return handleToolApiCall(() => Promise.reject(error)); 
        }
    }
  • Input argument schema using Zod, defining search_term (required), fetch_limit (scope of lifelogs to search), and common pagination/filter options.
    const SearchArgsSchema = {
        search_term: z.string().describe("The text to search for within lifelog titles and content."),
        fetch_limit: z.number().int().positive().max(MAX_TOTAL_FETCH_LIMIT).optional().default(20).describe(`How many *recent* lifelogs to fetch from the API to search within (Default: 20, Max: ${MAX_TOTAL_FETCH_LIMIT}). This defines the scope of the search, NOT the number of results returned.`),
        limit: CommonListArgsSchema.limit,
        timezone: CommonListArgsSchema.timezone,
        includeMarkdown: CommonListArgsSchema.includeMarkdown,
        includeHeadings: CommonListArgsSchema.includeHeadings,
        isStarred: CommonListArgsSchema.isStarred,
    };
  • src/server.ts:599-645 (registration)
    MCP server registration of the tool, providing name, detailed description emphasizing keyword-only usage on recent logs, input schema, and handler callback.
    server.tool( "limitless_search_lifelogs",
        "Performs a simple text search for specific keywords/phrases within the title and content of *recent* logs/Pendant recordings. Use ONLY for keywords, NOT for concepts like 'action items' or 'summaries'. Searches only recent logs (limited scope).",
        SearchArgsSchema,
        async (args, _extra) => {
            const fetchLimit = args.fetch_limit ?? 20;
            console.error(`[Server Tool] Search initiated for term: "${args.search_term}", fetch_limit: ${fetchLimit}`);
            try {
                const logsToSearch = await getLifelogs(limitlessApiKey, { 
                    limit: fetchLimit, 
                    direction: 'desc', 
                    timezone: args.timezone, 
                    includeMarkdown: args.includeMarkdown ?? true, 
                    includeHeadings: args.includeHeadings ?? true, 
                    isStarred: args.isStarred 
                });
                
                if (logsToSearch.length === 0) {
                    return { content: [{ type: "text", text: "No recent lifelogs found to search within." }] };
                }
                
                const searchTermLower = args.search_term.toLowerCase();
                const matchingLogs = logsToSearch.filter(log => 
                    log.title?.toLowerCase().includes(searchTermLower) || 
                    (log.markdown && log.markdown.toLowerCase().includes(searchTermLower))
                );
                
                const finalLimit = args.limit; // This limit applies to the *results*
                const limitedResults = finalLimit ? matchingLogs.slice(0, finalLimit) : matchingLogs;
                
                if (limitedResults.length === 0) {
                    return { content: [{ type: "text", text: `No matches found for "${args.search_term}" within the ${logsToSearch.length} most recent lifelogs searched.` }] };
                }
                
                // Use createSafeResponse to handle token limits
                return createSafeResponse(
                    limitedResults,
                    `Found ${limitedResults.length} match(es) for "${args.search_term}" within the ${logsToSearch.length} most recent lifelogs searched${finalLimit !== undefined ? ` (displaying up to ${finalLimit})` : ''}`,
                    {
                        hasMore: matchingLogs.length > limitedResults.length,
                        totalFetched: logsToSearch.length
                    }
                );
            } catch (error) { 
                return handleToolApiCall(() => Promise.reject(error)); 
            }
        }
    );
Behavior3/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 effectively describes the search scope ('recent logs'), limitations ('limited scope'), and search type ('keywords/phrases'), which are crucial behavioral traits. However, it lacks details on permissions, rate limits, or error handling, which would be valuable for a search tool with 7 parameters.

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

Conciseness5/5

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

The description is concise and well-structured in two sentences. The first sentence states the purpose and scope, while the second provides critical usage guidelines. Every sentence earns its place with no redundant or vague language.

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

Completeness4/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, search functionality) and lack of annotations or output schema, the description is reasonably complete. It clarifies the tool's purpose, usage boundaries, and behavioral scope. However, it could improve by mentioning the return format or pagination behavior, especially since there's no output schema.

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 minimal parameter semantics beyond the schema, only implying the 'recent' scope which relates to 'fetch_limit'. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 a simple text search for specific keywords/phrases within the title and content of *recent* logs/Pendant recordings.' It specifies the verb (search), resource (recent logs/Pendant recordings), and scope (title and content). It also distinguishes from siblings by emphasizing keyword-based search rather than conceptual analysis like 'limitless_analyze_speaker' or 'limitless_extract_action_items'.

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

Usage Guidelines5/5

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

The description provides explicit usage guidelines: 'Use ONLY for keywords, NOT for concepts like 'action items' or 'summaries'. Searches only recent logs (limited scope).' This clearly defines when to use this tool versus alternatives like 'limitless_extract_action_items' or 'limitless_get_daily_summary', and sets boundaries on its applicability.

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