GetNextAlarmTool

class GetNextAlarmTool(context: Context) : McpTool

Reports the next scheduled alarm clock via AlarmManager.getNextAlarmClock. Android has no public API to list alarms (each clock app stores its own), so this is the only alarm the platform exposes: the soonest one any app registered with AlarmManager.setAlarmClock for the current user — normally the clock app's next alarm. Needs no permission.

Output: has_alarm, trigger_time (ISO-8601 local date-time in the device timezone, e.g. 2026-03-01T07:30:00), trigger_millis (epoch millis), and creator_package (the package that created the alarm's show intent, usually the clock app; null when unavailable). The last three are null when no alarm is scheduled.

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