Skip to main content
Glama

create_note

Create notes in Bear with titles, Markdown content, tags, and options to pin or open immediately.

Instructions

Create a new note in Bear

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoNote title
textNoNote content (supports Markdown)
tagsNoList of tags to add (without # prefix)
pinNoPin the note to the top
open_noteNoOpen the note in Bear after creation

Implementation Reference

  • The core logic that implements the create_note functionality by constructing a bear:// URL and invoking it via macOS 'open'.
    def create_note(
        title: Optional[str] = None,
        text: Optional[str] = None,
        tags: Optional[list[str]] = None,
        pin: bool = False,
        open_note: bool = False
    ) -> dict[str, str]:
        """
        Create a new note in Bear.
    
        Args:
            title: Note title
            text: Note content (supports Markdown)
            tags: List of tags to add (without # prefix)
            pin: Pin the note to the top of the list
            open_note: Open the note in Bear after creation
    
        Returns:
            Dictionary with operation result
        """
        params = {}
    
        if title:
            params["title"] = title
        if text:
            params["text"] = text
        if tags:
            # Join tags with commas
            params["tags"] = ",".join(tags)
        if pin:
            params["pin"] = "yes"
        if open_note:
            params["open_note"] = "yes"
    
        query_string = urllib.parse.urlencode(params)
        url = f"bear://x-callback-url/create?{query_string}"
    
        return _open_bear_url(url)
  • The MCP tool registration for 'create_note', defining its input schema.
        name="create_note",
        description="Create a new note in Bear",
        inputSchema={
            "type": "object",
            "properties": {
                "title": {
                    "type": "string",
                    "description": "Note title",
                },
                "text": {
                    "type": "string",
                    "description": "Note content (supports Markdown)",
                },
                "tags": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "List of tags to add (without # prefix)",
                },
                "pin": {
                    "type": "boolean",
                    "description": "Pin the note to the top",
                    "default": False,
                },
                "open_note": {
                    "type": "boolean",
                    "description": "Open the note in Bear after creation",
                    "default": False,
                },
            },
        },
    ),
  • The handler logic within the MCP server that parses the tool arguments and calls the backend create_note function.
    elif name == "create_note":
        if not isinstance(arguments, dict):
            raise ValueError("Invalid arguments")
    
        result = create_note(
            title=arguments.get("title"),
            text=arguments.get("text"),
            tags=arguments.get("tags"),
            pin=arguments.get("pin", False),
            open_note=arguments.get("open_note", False)
        )
        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