<?php
 namespace plugins\AiAssistant\Mcp\Examples\ComplexToolSchema; use Mcp\Capability\Attribute\McpTool; use plugins\AiAssistant\Mcp\Examples\ComplexToolSchema\Model\Attendee; use plugins\AiAssistant\Mcp\Examples\ComplexToolSchema\Model\EventPriority; use plugins\AiAssistant\Mcp\Examples\ComplexToolSchema\Model\EventType; final class McpEventScheduler { #[McpTool(name: 'schedule_event')] public function scheduleEvent( string $title, string $date, EventType $type, ?string $time = null, EventPriority $priority = EventPriority::Normal, ?array $attendees = null, bool $sendInvites = true, ): array { $eventDetails = [ 'title' => $title, 'date' => $date, 'type' => $type->value, 'time' => $time ?? 'All day', 'priority' => $priority->name, 'attendees' => $attendees ?? [], 'invites_will_be_sent' => ($attendees && $sendInvites), 'event_url' => 'http://php85.devel.tina.dcs/dan.baluta/tina3/project/disp.php?module=Home', ]; return [ 'success' => true, 'message' => \sprintf('Event "%s" scheduled successfully for "%s".', $title, $date), 'event_details' => $eventDetails, ]; } } 