open_note
Open a specific note in Bear by providing its unique identifier to access and view content directly.
Instructions
Open a specific note in Bear
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note_id | Yes | The unique identifier of the note (ZUNIQUEIDENTIFIER) |
Implementation Reference
- src/mcp_bear/bear_url.py:147-162 (handler)The actual implementation of the open_note tool, which constructs a bear://x-callback-url and executes it.
def open_note(note_id: str) -> dict[str, str]: """ Open a specific note in Bear. Args: note_id: The unique identifier of the note (ZUNIQUEIDENTIFIER) Returns: Dictionary with operation result """ params = {"id": note_id} query_string = urllib.parse.urlencode(params) url = f"bear://x-callback-url/open-note?{query_string}" return _open_bear_url(url) - src/mcp_bear/server.py:362-367 (registration)The server-side handler block in the MCP server implementation that maps the 'open_note' tool request to the implementation function.
elif name == "open_note": if not isinstance(arguments, dict) or "note_id" not in arguments: raise ValueError("Missing required argument: note_id") result = open_note(note_id=arguments["note_id"]) return [TextContent(type="text", text=str(result))] - src/mcp_bear/server.py:174-186 (schema)The tool definition and input schema for the 'open_note' tool.
name="open_note", description="Open a specific note in Bear", inputSchema={ "type": "object", "properties": { "note_id": { "type": "string", "description": "The unique identifier of the note (ZUNIQUEIDENTIFIER)", }, }, "required": ["note_id"], }, ),