SetDndModeTool

class SetDndModeTool(context: Context) : McpTool

Sets the Do Not Disturb interruption filter.

Calls android.app.NotificationManager.setInterruptionFilter. Requires DND policy access (isNotificationPolicyAccessGranted), a special access granted via Settings > Apps > Special access > Do Not Disturb access; without it the tool returns an error. Idempotent (setting the same mode twice has the same effect).

Output keys: success, mode.

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