SetVolumeTool

class SetVolumeTool(context: Context) : McpTool

Sets the volume of an audio stream (media, ring, alarm, or notification; default media), clamping the level to the stream's max. The underlying AudioManager call needs no permission, so SettingsTools always registers this tool. (Changing the ring/notification stream while Do Not Disturb is active may throw SecurityException, reported as an error.)

Output keys on success: success (true), stream, level (clamped), max_level.

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 outputSchema: Map<String, Any>
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