CreateEventTool

class CreateEventTool(context: Context) : McpTool

Inserts a new event into CalendarContract.Events via ContentResolver. Requires WRITE_CALENDAR. start/end are parsed as yyyy-MM-dd HH:mm (device timezone); when calendar_id is omitted it falls back to the primary calendar (or first available, see getPrimaryCalendarId). Output: event_id (the inserted row id, may be null if the URI lacks a numeric segment), plus echoed title, start, and end.

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