Skip to main content
Glama
netologist
by netologist

get_bear_note

Retrieve detailed content and metadata of a specific Bear note using its unique identifier. Ideal for accessing and analyzing individual notes stored in the Bear App.

Instructions

Get a specific Bear note by ID

Args: note_id: Bear note's unique identifier

Returns: Complete note content with metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYes

Implementation Reference

  • main.py:172-190 (handler)
    MCP tool handler for 'get_bear_note'. Decorated with @mcp.tool(), it retrieves a Bear note by ID using the helper get_note_by_id, handles missing notes and errors, returning formatted note data or error message.
    @mcp.tool() def get_bear_note(note_id: str) -> Dict[str, Any]: """ Get a specific Bear note by ID Args: note_id: Bear note's unique identifier Returns: Complete note content with metadata """ try: note = get_note_by_id(note_id) if note: return note else: return {"error": "Note not found"} except Exception as e: return {"error": f"Error retrieving note: {str(e)}"}
  • Helper function that connects to Bear's SQLite database, queries for the note by unique ID (excluding trashed notes), formats the result with metadata including word count, or returns None if not found.
    def get_note_by_id(note_id: str) -> Optional[Dict[str, Any]]: """Get a specific note by ID""" conn = get_bear_db_connection() try: cursor = conn.execute(""" SELECT ZUNIQUEIDENTIFIER as id, ZTITLE as title, ZTEXT as content, ZCREATIONDATE as created_date, ZMODIFICATIONDATE as modified_date FROM ZSFNOTE WHERE ZUNIQUEIDENTIFIER = ? AND ZTRASHED = 0 """, (note_id,)) row = cursor.fetchone() if row: content = row["content"] or "" return { "id": row["id"], "title": row["title"] or "Untitled", "content": content, "created_date": row["created_date"], "modified_date": row["modified_date"], "word_count": len(content.split()) if content else 0 } return None finally: conn.close()

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