Skip to main content
Glama
netologist
by netologist

find_notes_by_title

Search and retrieve notes from the Bear App by specifying a title query. Choose between exact or partial title matching to filter results based on your criteria.

Instructions

Find notes by title

Args: title_query: Title text to search for exact_match: Whether to match title exactly or use partial matching

Returns: Notes matching the title criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exact_matchNo
title_queryYes

Implementation Reference

  • main.py:307-368 (handler)
    The handler function decorated with @mcp.tool(), implementing the logic to query the Bear App SQLite database for notes matching the given title query, supporting both exact and partial matching. It returns a list of matching notes with metadata including ID, title, content preview, and timestamps.
    @mcp.tool() def find_notes_by_title(title_query: str, exact_match: bool = False) -> List[Dict[str, Any]]: """ Find notes by title Args: title_query: Title text to search for exact_match: Whether to match title exactly or use partial matching Returns: Notes matching the title criteria """ try: conn = get_bear_db_connection() if exact_match: sql = """ SELECT ZUNIQUEIDENTIFIER as id, ZTITLE as title, ZTEXT as content, ZCREATIONDATE as created_date, ZMODIFICATIONDATE as modified_date FROM ZSFNOTE WHERE ZTRASHED = 0 AND ZTITLE = ? ORDER BY ZMODIFICATIONDATE DESC """ params = [title_query] else: sql = """ SELECT ZUNIQUEIDENTIFIER as id, ZTITLE as title, ZTEXT as content, ZCREATIONDATE as created_date, ZMODIFICATIONDATE as modified_date FROM ZSFNOTE WHERE ZTRASHED = 0 AND ZTITLE LIKE ? ORDER BY ZMODIFICATIONDATE DESC """ params = [f"%{title_query}%"] cursor = conn.execute(sql, params) results = [] for row in cursor.fetchall(): content = row["content"] or "" results.append({ "id": row["id"], "title": row["title"] or "Untitled", "content": content, "created_date": row["created_date"], "modified_date": row["modified_date"], "preview": content[:200] + "..." if len(content) > 200 else content }) conn.close() return results except Exception as e: return [{"error": f"Error searching by title: {str(e)}"}]

Other Tools

Related 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/netologist/mcp-bear-notes'

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