DismissNotificationTool

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.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult