Skip to main content
Glama

get_notes_like

Search Bear Notes for content containing specific text strings to quickly locate relevant information within your notes database.

Instructions

Get notes that include a specific text string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
likeYesFind notes that have this text

Implementation Reference

  • The `get_notes_like` function in `src/mcp_bear/database.py` executes a SQL query against the Bear Notes database to search for notes containing specific text in their title or body, and returns them as a list of dictionaries.
    def get_notes_like(search_text: str) -> list[dict[str, Any]]:
        """Search for notes containing specific text in title or body."""
        db_path = get_bear_db_path()
        conn = sqlite3.connect(db_path)
        conn.row_factory = sqlite3.Row
        cursor = conn.cursor()
    
        try:
            # Use parameterized query to prevent SQL injection
            query = """
                SELECT * FROM ZSFNOTE
                WHERE ZARCHIVED=0
                AND (ZTEXT LIKE ? OR ZTITLE LIKE ?);
            """
            search_pattern = f"%{search_text}%"
            cursor.execute(query, (search_pattern, search_pattern))
            rows = cursor.fetchall()
    
            notes = []
            for row in rows:
                notes.append({
                    "ZCREATIONDATE": row["ZCREATIONDATE"],
                    "ZSUBTITLE": row["ZSUBTITLE"],
                    "ZTEXT": row["ZTEXT"],
                    "ZTITLE": row["ZTITLE"],
                    "ZUNIQUEIDENTIFIER": row["ZUNIQUEIDENTIFIER"],
                })
    
            return notes
        finally:
            conn.close()
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool retrieves notes with a text string but doesn't disclose behavioral traits like whether it's read-only, how results are returned (e.g., list format, pagination), performance implications, or error handling. This leaves significant gaps for a tool with no structured safety hints.

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 a single, efficient sentence that front-loads the core functionality ('Get notes that include a specific text string'). There is zero waste, and every word earns its place by clarifying the tool's purpose.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It lacks details on return values (e.g., what data is included in notes), behavioral context (e.g., read-only nature, potential side effects), and usage nuances compared to siblings. For a search tool with one parameter, this minimal description leaves too much undefined.

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?

Schema description coverage is 100%, with the parameter 'like' clearly documented in the schema as 'Find notes that have this text'. The description adds no additional meaning beyond this, such as syntax examples or matching behavior (e.g., case sensitivity). Baseline 3 is appropriate since the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('notes'), specifying they must include a text string. It distinguishes from siblings like 'get_notes' (no filtering) and 'get_note_by_id' (ID-based), but doesn't explicitly name alternatives.

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

Usage Guidelines3/5

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

Usage is implied by the description's focus on text-based filtering, suggesting it's for finding notes containing specific text rather than by ID, tag, or other criteria. However, no explicit guidance on when to use this versus alternatives like 'search_bear' or 'get_notes_by_tag' is provided.

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/maxim-ist/mcp-bear'

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