search_bear
Search Bear Notes on macOS to find specific notes using a search term, enabling users to locate and access relevant information stored in their notes database.
Instructions
Open Bear and show search results for a term
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes | Search term |
Implementation Reference
- src/mcp_bear/bear_url.py:165-180 (handler)The actual implementation logic for the "search_bear" tool, which constructs a bear:// URL and calls _open_bear_url.
def search_in_bear(term: str) -> dict[str, str]: """ Open Bear and show search results for a term. Args: term: Search term Returns: Dictionary with operation result """ params = {"term": term} query_string = urllib.parse.urlencode(params) url = f"bear://x-callback-url/search?{query_string}" return _open_bear_url(url) - src/mcp_bear/server.py:187-200 (registration)The tool definition and registration for "search_bear" in the MCP server setup.
Tool( name="search_bear", description="Open Bear and show search results for a term", inputSchema={ "type": "object", "properties": { "term": { "type": "string", "description": "Search term", }, }, "required": ["term"], }, ), - src/mcp_bear/server.py:369-374 (handler)The MCP tool handler dispatch logic that routes "search_bear" calls to the search_in_bear implementation.
elif name == "search_bear": if not isinstance(arguments, dict) or "term" not in arguments: raise ValueError("Missing required argument: term") result = search_in_bear(term=arguments["term"]) return [TextContent(type="text", text=str(result))]