Skip to main content
Glama

Outlook Meetings Scheduler MCP Server

people.ts1.92 kB
import { z } from "zod"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { registerTool } from "../utils/tool-registration.js"; import { getGraphConfig } from "../utils/graph-config.js"; /** * Register people-related tools with the MCP server */ export function registerPeopleTools(server: McpServer): void { registerTool( server, "find-person", "Find a person's email address by their name", { name: z.string().describe("Name or partial name of the person to find"), }, async ({ name }) => { const { graph, userEmail } = getGraphConfig(); // Search for the person by name const people = await graph.searchPeople(name, userEmail); if (!people) { return { content: [ { type: "text", text: "Failed to search for people. Check the logs for details.", }, ], }; } if (people.length === 0) { return { content: [ { type: "text", text: `No people found matching "${name}". Please provide the full email address.`, }, ], }; } // Format the results for response const peopleList = people.map((person: any, index: number) => { const email = person.mail || person.userPrincipalName || person.emailAddresses?.[0]?.address || "No email available"; const displayName = person.displayName || "Unknown name"; return `${index + 1}. ${displayName} (${email})`; }).join("\n"); const successMessage = ` Found ${people.length} people matching "${name}": ${peopleList} You can use these email addresses to create a calendar event.`; return { content: [ { type: "text", text: successMessage, }, ], }; } ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anoopt/outlook-meetings-scheduler-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server