Model Context Protocol (MCP) server providing Claude AI with access to Microsoft 365 Copilot APIs - Retrieval, Search, and Chat capabilities
M365 Copilot MCP has 4 clearly defined tools with explicit registration in src/server.ts. All tools have descriptions (50-250+ chars, well within baseline 34-392 range) and input schemas with typed parameters. Descriptions are action-oriented and include WHEN/WHY guidance. However, there are meaningful gaps: tool names do not follow verb_noun convention (e.g., 'm365copilotlogout' vs canonical 'logout'), parameters lack enum constraints and format specifications, output schemas are not documented, and error handling lacks recovery guidance. The server meets baseline documentation requirements but falls short of production-grade patterns around parameter constraints, output structure, and error classification.
Enables conversational AI interactions with Microsoft 365 Copilot. Maintains conversation context for multi-turn dialogues - ideal for complex queries, follow-up questions, and time-aware requests. Use this when: - User wants to have a conversation with Copilot (e.g., "Ask Copilot about my schedule") - Questions involve time, calendar, or scheduling (e.g., "What meetings do I have tomorrow?") - Follow-up questions or clarifications are needed - Complex queries that benefit from Copilot's reasoning (e.g., "Summarize team discussions and action items") Example messages: "What's on my calendar tomorrow?", "Summarize recent emails about the project", "Who should I follow up with this week?" Requires timezone parameter (IANA format: "America/New_York", "Europe/London", "Asia/Shanghai"). DO NOT use for: Simple text retrieval (use m365copilotretrieval instead) or finding documents (use m365copilotsearch instead).
Logs out the current user by clearing all cached credentials and authentication state. This tool does not require authentication and can be called at any time. Use this when: - User wants to switch to a different Microsoft 365 account - User wants to clear their authentication session - User explicitly requests to logout or sign out After calling this tool: - All cached credentials will be cleared (authentication record and token cache) - User MUST restart the MCP server for changes to take full effect - On next tool call (after restart), user will be prompted to log in again IMPORTANT: Tell the user they need to restart the MCP server for the logout to take full effect.
Retrieves relevant text extracts from user's SharePoint and OneDrive content to answer questions using RAG (Retrieval-Augmented Generation). Returns text snippets with relevance scores - ideal for grounding answers in M365 data. Use this when: - User asks questions that need answers from their M365 content (e.g., "What did the team decide about the project?") - You need text content to support your response with specific information - Grounding AI responses with actual document content is required Example queries: "project deadlines", "budget approval status", "team meeting notes about feature X" DO NOT use for: Finding document links (use m365copilotsearch instead) or interactive conversations (use m365copilotchat instead).
Tool names do not follow verb_noun convention. 'm365copilotlogout', 'm365copilotretrieval', 'm365copilotsearch', 'm365copilotchat' are compound domain-prefixed names. LLMs parse intent better from canonical verbs: 'logout', 'retrieve_content', 'search_documents', 'chat'. Current names force LLMs to infer intent from description rather than name alone.
Output schemas are not documented in tool definitions or code. Source code shows request handling but no structured response type definitions. LLMs cannot plan downstream tool calls or extract specific fields without knowing return structure. All four tools lack documented return types.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 58 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 47 | - | v1 |
Searches across SharePoint, OneDrive, and other M365 content to find and locate specific documents. Returns document links with preview text - ideal for document discovery and navigation. Use this when: - User wants to find or locate specific files/documents (e.g., "Find the VPN setup guide") - User needs document links to open or share - Building a list of relevant documents Example queries: "quarterly budget spreadsheet", "network configuration document", "presentation about product launch" DO NOT use for: Extracting text to answer questions (use m365copilotretrieval instead) or asking Copilot questions (use m365copilotchat instead).
Parameter 'timeZone' in m365copilotchat lacks enum or validation constraint. Description states 'REQUIRED - Must be a valid IANA timezone identifier' but provides no enum or regex pattern. LLMs will hallucinate invalid timezone strings (e.g., 'Eastern Time', 'EST'). Should declare enum of common IANA identifiers or add pattern validation.
Error handling lacks recovery guidance. Source code shows basic logging but no documented error categories or next-step guidance. E.g., if authentication fails, should 'm365copilotlogout' be called first? If search returns no results, should retrieval be tried? Agents need classification (retryable, user-fixable, fatal) and actionable recovery paths.
String parameters lack format constraints. 'queryString' (m365copilotretrieval), 'query' (m365copilotsearch), and 'message' (m365copilotchat) accept unbounded free-form strings. No length limits, pattern validation, or format declaration. LLMs may pass extremely long strings or malformed queries, risking API errors or poor retrieval quality.
m365copilotlogout description says 'This tool does not require authentication and can be called at any time' but logout is inherently a state-changing operation. Description should clarify that calling it clears session state and invalidates future tool calls until re-authentication. The emphasis on 'restart the MCP server' suggests stateful behavior that conflicts with the stateless MCP protocol design.
No pagination parameters documented for retrieval/search tools. If m365copilotretrieval or m365copilotsearch return many results, there is no limit or offset/page parameter visible in the schema. Large result sets will exhaust context window. Should include maxResults, limit, or similar constraint.