trash_note
Move a note to trash in Bear Notes using its unique identifier. This tool helps users manage notes by removing unwanted items from their workspace.
Instructions
Move a note to trash
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:129-144 (handler)The core implementation of the trash_note tool, which constructs a Bear x-callback-url and opens it.
def trash_note(note_id: str) -> dict[str, str]: """ Move a note to trash. 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/trash?{query_string}" return _open_bear_url(url) - src/mcp_bear/server.py:160-172 (registration)Registration of the trash_note tool in the MCP server list.
name="trash_note", description="Move a note to trash", inputSchema={ "type": "object", "properties": { "note_id": { "type": "string", "description": "The unique identifier of the note (ZUNIQUEIDENTIFIER)", }, }, "required": ["note_id"], }, ), - src/mcp_bear/server.py:355-360 (handler)Tool call handler logic for trash_note in the MCP server.
elif name == "trash_note": if not isinstance(arguments, dict) or "note_id" not in arguments: raise ValueError("Missing required argument: note_id") result = trash_note(note_id=arguments["note_id"]) return [TextContent(type="text", text=str(result))]