Skip to main content
Glama

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
NameRequiredDescriptionDefault
tagYesTag name (without # prefix)

Implementation Reference

  • 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)
  • 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"],
        },
    ),
  • 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))]

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/maxim-ist/mcp-bear'

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