Package-level declarations
Types
Cancels a notification by key via McpNotificationListenerServiceBase.cancelByKey. Requires the listener service bound (via NotificationListenerHolder) and notification listener access granted, else an error naming which precondition failed. The key must reference a currently-active notification in NotificationStore, else not found. The source app may immediately repost an identical notification (e.g. persistent media/foreground-service notifications), so a successful dismiss is not a guarantee it stays gone. Output on success: success (true) and the echoed key.
Fires a notification's non-reply Notification.Action PendingIntent (e.g. Mark as read, Snooze, Archive) so the LLM doesn't need per-app intent shims. Requires the listener service bound and notification listener access granted. Exactly one of action_label (case- insensitive substring match on the action title) or action_index must be supplied — supplying both or neither is conflicting_args. Looks the notification up by key in NotificationStore; a notification with no actions, or no match for the given label/index, returns action_not_found; an action whose actionIntent is null, or whose PendingIntent was cancelled, returns action_not_invokable. Output on success: success (true), the echoed key, the resolved action_label, and package_name.
Lists every active notification from any app, read from NotificationStore.eventSnapshot. Requires the listener configured, granted access and connected (listenerUnavailable), else an error naming which precondition failed. Results are sorted most-recent-first, optionally filtered to one package_name, and capped by limit (default 20, clamped 1-100). Ongoing notifications (media players, foreground services) are left out unless include_ongoing is true, and so is a bundle's summary while its children show. text prefers the expanded body (EXTRA_BIG_TEXT) over EXTRA_TEXT; for chat apps using MessagingStyle that is usually just the latest message. app_label comes from the app info each notification carries, so package visibility doesn't hide it.
Lists active notifications that expose a free-form RemoteInput reply action (WhatsApp, Signal, Messenger, Slack, SMS, Gmail, etc.), read from NotificationStore.repliableSnapshot. Requires the listener service bound and notification listener access granted, else an error naming which precondition failed. Results are sorted most-recent-first and capped by limit (default 20, clamped 1-100). Each entry includes the app's display label (from the app info the notification carries, cached per call) alongside the notification's key, title, text, post time, and reply-action label/hint — everything ReplyToNotificationTool needs.
Provider for the notification-reply module. Wires up ListNotificationsTool, ListRepliableNotificationsTool, ReplyToNotificationTool, DismissNotificationTool, and InvokeNotificationActionTool. All five read/act against NotificationStore and require the host's McpNotificationListenerServiceBase to be bound with notification listener access granted — a special-access permission granted via Settings, not a runtime dialog, hence requiredPermissions is empty and hasPermissions always returns true. Use isNotificationListenerEnabled or permissionStatus to check actual readiness.
Sends text through a notification's RemoteInput reply action, looked up by key in NotificationStore.findRepliable (populate via ListRepliableNotificationsTool). Requires the listener service bound and notification listener access granted. The reply is delivered by firing the action's PendingIntent with the text packed via RemoteInput.addResultsToIntent — success means the PendingIntent fired without throwing, not that the receiving app confirmed delivery. Output on success: success (true), package_name, and the resolved action_label.