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 android.media.AudioManager call needs no permission, but SettingsTools only registers this tool when WRITE_SETTINGS is granted.

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 parameters: List<ToolParameter>

Functions

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