Appearance
Reminders連携
Issue: #4 Reminders連携
概要
macOS標準リマインダーアプリを AppleScript で操作し、リマインダーの作成・完了・一覧を行う。
ツール定義
list_reminders
リマインダー一覧を取得する。
python
@mcp.tool()
def list_reminders(list_name: str = "") -> str:
"""未完了のリマインダー一覧を取得する"""| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| list_name | str | No | リスト名(指定なしは全リスト) |
AppleScript:
applescript
tell application "Reminders"
set reminderList to {}
repeat with r in (reminders whose completed is false)
set end of reminderList to {name of r, due date of r, body of r}
end repeat
return reminderList
end tellcreate_reminder
python
@mcp.tool()
def create_reminder(title: str, due_date: str = "", list_name: str = "", note: str = "") -> str:
"""新しいリマインダーを作成する"""| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
| title | str | Yes | リマインダーのタイトル |
| due_date | str | No | 期限 (例: "2026-04-03 18:00") |
| list_name | str | No | リスト名 |
| note | str | No | メモ |
complete_reminder
python
@mcp.tool()
def complete_reminder(title: str) -> str:
"""リマインダーを完了にする"""list_overdue_reminders
python
@mcp.tool()
def list_overdue_reminders() -> str:
"""期限切れのリマインダー一覧を取得する"""delete_reminder
python
@mcp.tool()
def delete_reminder(title: str) -> str:
"""リマインダーを削除する"""