open_tag
Display all Bear notes with a specific tag by entering the tag name to filter and organize your notes efficiently.
Instructions
Open Bear and show all notes with a specific tag
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | Yes | Tag name (without # prefix) |
Implementation Reference
- src/mcp_bear/bear_url.py:219-234 (handler)The actual implementation of the open_tag tool logic, which constructs a Bear x-callback-url and invokes it.
def open_tag(tag: str) -> dict[str, str]: """ Open Bear and show all notes with a specific tag. Args: tag: Tag name (without # prefix) Returns: Dictionary with operation result """ params = {"name": tag} query_string = urllib.parse.urlencode(params) url = f"bear://x-callback-url/open-tag?{query_string}" return _open_bear_url(url) - src/mcp_bear/server.py:265-278 (schema)Registration of the open_tag tool including its name, description, and input schema.
Tool( name="open_tag", description="Open Bear and show all notes with a specific tag", inputSchema={ "type": "object", "properties": { "tag": { "type": "string", "description": "Tag name (without # prefix)", }, }, "required": ["tag"], }, ), - src/mcp_bear/server.py:411-416 (handler)The handler logic within the MCP server that routes the 'open_tag' tool call to the corresponding implementation function.
elif name == "open_tag": if not isinstance(arguments, dict) or "tag" not in arguments: raise ValueError("Missing required argument: tag") result = open_tag(tag=arguments["tag"]) return [TextContent(type="text", text=str(result))]