get_attendee_status
Check attendee response status for Outlook meetings to track who accepted, declined, or hasn't responded to an event invitation.
Instructions
Check the response status of meeting attendees
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eventId | Yes | Event ID | |
| calendar | No | Calendar name (optional) |
Implementation Reference
- src/outlook-manager.ts:995-1068 (handler)Core handler function that executes PowerShell script via Outlook COM interop to retrieve meeting details and attendee response statuses (Organizer, Tentative, Accepted, Declined, Not Responded).async getAttendeeStatus(options: { eventId: string; calendar?: string; }): Promise<any> { try { const script = ` try { Add-Type -AssemblyName "Microsoft.Office.Interop.Outlook" -ErrorAction Stop $outlook = New-Object -ComObject Outlook.Application -ErrorAction Stop $namespace = $outlook.GetNamespace("MAPI") # Get appointment $appointment = $namespace.GetItemFromID("${options.eventId.replace(/"/g, '""')}") if (-not $appointment) { throw "Event not found with ID: ${options.eventId.replace(/"/g, '""')}" } # Check if it's a meeting if ($appointment.MeetingStatus -eq 0) { # olNonMeeting throw "The specified event is not a meeting" } # Get attendees $attendees = @() foreach ($recipient in $appointment.Recipients) { $responseStatus = switch ($recipient.MeetingResponseStatus) { 1 { "Organizer" } 2 { "Tentative" } 3 { "Accepted" } 4 { "Declined" } 0 { "Not Responded" } default { "Unknown" } } $attendees += [PSCustomObject]@{ Name = $recipient.Name Email = if ($recipient.Address) { $recipient.Address } else { $recipient.Name } ResponseStatus = $responseStatus } } # Build result $result = [PSCustomObject]@{ Subject = $appointment.Subject Start = $appointment.Start.ToString("yyyy-MM-ddTHH:mm:ss") End = $appointment.End.ToString("yyyy-MM-ddTHH:mm:ss") Location = if ($appointment.Location) { $appointment.Location } else { "" } Organizer = if ($appointment.Organizer) { $appointment.Organizer } else { "" } Attendees = $attendees } Write-Output ($result | ConvertTo-Json -Compress -Depth 3) } catch { Write-Output ([PSCustomObject]@{ Error = $_.Exception.Message } | ConvertTo-Json -Compress) } `; const result = await this.executePowerShell(script); const cleanResult = result.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, '').trim(); const data = JSON.parse(cleanResult); if (data.Error) { throw new Error(data.Error); } return data; } catch (error) { throw new Error(`Failed to get attendee status: ${error instanceof Error ? error.message : String(error)}`); } }
- src/index.ts:430-447 (registration)Tool registration in the ListTools response, defining name, description, and input schema (requires eventId).{ name: "get_attendee_status", description: "Check the response status of meeting attendees", inputSchema: { type: "object", properties: { eventId: { type: "string", description: "Event ID" }, calendar: { type: "string", description: "Calendar name (optional)" } }, required: ["eventId"] } },
- src/index.ts:802-818 (handler)MCP server dispatch handler in CallToolRequest switch that calls the core getAttendeeStatus method and formats the response for the protocol.case 'get_attendee_status': { const attendeeStatus = await outlookManager.getAttendeeStatus({ eventId: (args as any)?.eventId, calendar: (args as any)?.calendar }); return { content: [ { type: 'text', text: `👥 **Meeting Attendee Status**\n\n**Subject:** ${attendeeStatus.Subject}\n**Time:** ${attendeeStatus.Start} - ${attendeeStatus.End}\n**Location:** ${attendeeStatus.Location || 'N/A'}\n**Organizer:** ${attendeeStatus.Organizer}\n\n**Attendees:**\n` + attendeeStatus.Attendees.map((attendee: any, index: number) => `${index + 1}. ${attendee.Name} (${attendee.Email})\n Status: ${attendee.ResponseStatus}` ).join('\n') }, ], }; }