Skip to main content
Glama
netologist

Bear Notes MCP Server

by netologist

get_recent_notes

Retrieve recently modified notes from Bear App by specifying how many days to look back and the maximum number of results to return.

Instructions

Get recently modified notes

Args: days: Number of days to look back limit: Maximum number of results

Returns: Recently modified notes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
limitNo

Implementation Reference

  • main.py:369-426 (handler)
    The handler function for the 'get_recent_notes' MCP tool. It connects to the Bear App SQLite database, calculates the timestamp for notes modified in the specified number of days, queries the ZSFNOTE table for non-trashed notes modified since then, formats the results with metadata including preview and word count, and handles errors.
    @mcp.tool()
    def get_recent_notes(days: int = 7, limit: int = 20) -> List[Dict[str, Any]]:
        """
        Get recently modified notes
        
        Args:
            days: Number of days to look back
            limit: Maximum number of results
        
        Returns:
            Recently modified notes
        """
        try:
            conn = get_bear_db_connection()
            
            # Calculate timestamp for N days ago
            # Bear uses Core Data timestamps (seconds since 2001-01-01)
            import time
            import datetime
            
            now = datetime.datetime.now()
            days_ago = now - datetime.timedelta(days=days)
            
            # Convert to Core Data timestamp
            core_data_epoch = datetime.datetime(2001, 1, 1)
            timestamp = (days_ago - core_data_epoch).total_seconds()
            
            cursor = conn.execute("""
                SELECT 
                    ZUNIQUEIDENTIFIER as id,
                    ZTITLE as title,
                    ZTEXT as content,
                    ZCREATIONDATE as created_date,
                    ZMODIFICATIONDATE as modified_date
                FROM ZSFNOTE 
                WHERE ZTRASHED = 0 AND ZMODIFICATIONDATE > ?
                ORDER BY ZMODIFICATIONDATE DESC
                LIMIT ?
            """, (timestamp, limit))
            
            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,
                    "word_count": len(content.split()) if content else 0
                })
            
            conn.close()
            return results
            
        except Exception as e:
            return [{"error": f"Error getting recent notes: {str(e)}"}]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool retrieves notes but doesn't describe what 'recently modified' means operationally (e.g., modification timestamp vs creation), whether results are sorted, pagination behavior, error conditions, or authentication needs. For a read operation with zero annotation coverage, this leaves significant gaps.

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 appropriately sized and front-loaded with the core purpose in the first line. The Args/Returns sections add necessary structure without redundancy. However, the 'Returns' section ('Recently modified notes') is somewhat tautological with the first line and could be more informative.

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 2 parameters with 0% schema coverage and no output schema, the description provides basic parameter semantics but lacks behavioral context (sorting, errors, etc.). For a simple read tool, it's minimally adequate but has clear gaps. The absence of annotations increases the burden that the description doesn't fully meet.

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 0%, so the description must compensate. It adds basic meaning for both parameters ('days: Number of days to look back', 'limit: Maximum number of results'), which goes beyond the schema's bare titles. However, it doesn't provide format details, constraints, or examples (e.g., valid ranges for days/limit). The description partially compensates but not fully.

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 'Get recently modified notes' - a specific verb ('Get') and resource ('notes') with a temporal qualifier ('recently modified'). It distinguishes from siblings like 'find_notes_by_title' or 'search_bear_notes' by focusing on recency rather than content-based search. However, it doesn't explicitly contrast with all siblings (e.g., 'get_bear_note' might fetch a single note).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer this over 'search_bear_notes' or 'find_notes_by_title', nor does it specify prerequisites or exclusions. The context is implied through the name and description but not explicitly stated.

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

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