# How to integrate Outlook MCP with Vercel AI SDK v6

```json
{
  "title": "How to integrate Outlook MCP with Vercel AI SDK v6",
  "toolkit": "Outlook",
  "toolkit_slug": "outlook",
  "framework": "Vercel AI SDK",
  "framework_slug": "ai-sdk",
  "url": "https://composio.dev/toolkits/outlook/framework/ai-sdk",
  "markdown_url": "https://composio.dev/toolkits/outlook/framework/ai-sdk.md",
  "updated_at": "2026-05-12T10:21:03.449Z"
}
```

## Introduction

This guide walks you through connecting Outlook to Vercel AI SDK v6 using the Composio tool router. By the end, you'll have a working Outlook agent that can download latest attachments from your inbox, create new calendar for project deadlines, add rule to move newsletters to folder through natural language commands.
This guide will help you understand how to give your Vercel AI SDK agent real control over a Outlook account through Composio's Outlook MCP server.
Before we dive in, let's take a quick look at the key ideas and tools involved.

## Also integrate Outlook with

- [ChatGPT](https://composio.dev/toolkits/outlook/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/outlook/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/outlook/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/outlook/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/outlook/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/outlook/framework/codex)
- [Cursor](https://composio.dev/toolkits/outlook/framework/cursor)
- [VS Code](https://composio.dev/toolkits/outlook/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/outlook/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/outlook/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/outlook/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/outlook/framework/cli)
- [Google ADK](https://composio.dev/toolkits/outlook/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/outlook/framework/langchain)
- [Mastra AI](https://composio.dev/toolkits/outlook/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/outlook/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/outlook/framework/crew-ai)

## TL;DR

Here's what you'll learn:
- How to set up and configure a Vercel AI SDK agent with Outlook integration
- Using Composio's Tool Router to dynamically load and access Outlook tools
- Creating an MCP client connection using HTTP transport
- Building an interactive CLI chat interface with conversation history management
- Handling tool calls and results within the Vercel AI SDK framework

## What is Vercel AI SDK?

The Vercel AI SDK is a TypeScript library for building AI-powered applications. It provides tools for creating agents that can use external services and maintain conversation state.
Key features include:
- streamText: Core function for streaming responses with real-time tool support
- MCP Client: Built-in support for Model Context Protocol via @ai-sdk/mcp
- Step Counting: Control multi-step tool execution with stopWhen: stepCountIs()
- OpenAI Provider: Native integration with OpenAI models

## What is the Outlook MCP server, and what's possible with it?

The Outlook MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Outlook account. It provides structured and secure access to your email, calendar, and contacts, so your agent can perform actions like sending emails, organizing folders, managing your calendar, and handling attachments on your behalf.
- Email organization and folder management: Let your agent create, delete, or organize mail folders to keep your inbox tidy and efficient.
- Calendar and event creation: Easily have your agent set up new calendars, so you can organize meetings and events without lifting a finger.
- Smart attachments handling: Automatically download files from your emails or add attachments to outgoing messages for seamless file management.
- Automated rules and filtering: Direct your agent to create email rules that filter, sort, or take action on messages as they arrive.
- Contact and category organization: Ask your agent to create new contact folders or master categories to streamline how you manage people and projects.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `OUTLOOK_ACCEPT_EVENT` | Accept calendar event invite | Accepts or tentatively accepts a calendar meeting invite on behalf of a user. Use this action when a user has received a meeting invitation and wants to indicate their attendance status (either confirmed or tentative). The organizer will receive a notification of the acceptance unless send_response is set to false. |
| `OUTLOOK_ADD_EVENT_ATTACHMENT` | Add event attachment | Adds an attachment to a specific Outlook calendar event. Use when you need to attach a file or nested item to an existing event. |
| `OUTLOOK_ADD_MAIL_ATTACHMENT` | Add mail attachment | Tool to add an attachment to an email message. Use when you have a message ID and need to attach a small (<3 MB) file or reference. |
| `OUTLOOK_BATCH_MOVE_MESSAGES` | Batch move messages | Batch-move up to 20 Outlook messages to a destination folder in a single Microsoft Graph $batch call. Use when moving multiple messages to avoid per-message move API calls. |
| `OUTLOOK_BATCH_UPDATE_MESSAGES` | Batch update messages | Batch-update up to 20 Outlook messages per call using Microsoft Graph JSON batching. Use when marking multiple messages read/unread or updating other properties to avoid per-message PATCH calls. |
| `OUTLOOK_CALENDAR_CREATE_EVENT` | Create Calendar Event | Creates a new Outlook calendar event, ensuring `start_datetime` is chronologically before `end_datetime`. |
| `OUTLOOK_CANCEL_CALENDAR_EVENT` | Cancel user's calendar event | Tool to cancel an event in a specific calendar for a specified user and send cancellation notifications to all attendees. Use when you need to cancel a meeting or event in a specific calendar on behalf of a user. |
| `OUTLOOK_CANCEL_CALENDAR_GROUP_CALENDAR_EVENT` | Cancel user calendar group event | Tool to cancel an event in a user's calendar within a calendar group and send cancellation notifications to all attendees. Use when canceling a meeting or event for a specific user in a calendar that belongs to a calendar group. |
| `OUTLOOK_CANCEL_EVENT` | Cancel user calendar event | Tool to cancel a calendar event for a specified user and send cancellation notifications to all attendees. Use when you need to cancel a meeting or event on behalf of a specific user. |
| `OUTLOOK_COPY_MAIL_FOLDER` | Copy user's mail folder | Tool to copy a user's mail folder and its contents to another folder. Use when you need to duplicate a folder structure for a specific user's mailbox. |
| `OUTLOOK_COPY_ME_MAIL_FOLDER` | Copy child mail folder | Tool to copy a child mail folder to a destination folder. Use when you need to duplicate a folder structure. |
| `OUTLOOK_COPY_MESSAGE` | Copy message to folder | Tool to copy an email message to another folder within the user's mailbox. Use when duplicating messages to multiple folders for organization. |
| `OUTLOOK_COPY_MESSAGE_FROM_CHILD_FOLDER` | Copy message from child folder | Tool to copy an email message from a child folder (nested folder) to another folder within the user's mailbox. Use when duplicating messages from nested folder structures. |
| `OUTLOOK_COPY_MESSAGE_FROM_MAIL_FOLDER` | Copy user message from folder | Tool to copy a message from a specific user's mail folder to another folder. Use when you need to duplicate a message from a known source folder to a destination folder for a specific user. |
| `OUTLOOK_CREATE_ATTACHMENT_UPLOAD_SESSION` | Create attachment upload session | Tool to create an upload session for large (>3 MB) message attachments. Use when you need to upload attachments in chunks. |
| `OUTLOOK_CREATE_ATTACHMENT_UPLOAD_SESSION_IN_CHILD_FOLDER` | Create attachment upload session in child folder | Tool to create an upload session for large (>3 MB) message attachments in child mail folders. Use when you need to upload attachments to messages in nested folder structures. |
| `OUTLOOK_CREATE_CALENDAR` | Create calendar | Tool to create a new calendar in the signed-in user's mailbox. Use when organizing events into a separate calendar. |
| `OUTLOOK_CREATE_CALENDAR_EVENT_ATTACHMENT` | Create calendar event attachment | Tool to create a new attachment for an event in a specific calendar. Use when you need to attach a file or item to an event within a particular calendar. |
| `OUTLOOK_CREATE_CALENDAR_EVENT_ATTACHMENT_UPLOAD_SESSION` | Create calendar event attachment upload session | Tool to create an upload session for large calendar event attachments in a specific calendar. Use when attaching files larger than 3 MB to Outlook calendar events in a specific calendar. |
| `OUTLOOK_CREATE_CALENDAR_EVENT_IN_CALENDAR` | Create event in specific calendar | Tool to create a new event in a specific calendar for a user. Use when you need to create events in a specific calendar (e.g., shared or secondary calendars). |
| `OUTLOOK_CREATE_CALENDAR_GROUP` | Create calendar group | Tool to create a new calendar group for a user. Use when needing to organize calendars into groups. |
| `OUTLOOK_CREATE_CALENDAR_GROUP_CALENDAR_EVENT_ATTACHMENT` | Create user calendar group event attachment | Tool to create a new attachment for an event in a calendar within a calendar group for a specific user. Use when you need to attach a file or item to an event in a user's calendar group. |
| `OUTLOOK_CREATE_CALENDAR_GROUP_CALENDAR_EVENT_EXTENSION` | Create event extension | Tool to create a new open extension on a calendar event within a specific calendar group and calendar. Use when you need to store custom data with an event. |
| `OUTLOOK_CREATE_CALENDAR_PERMISSION` | Create Calendar Permission | Tool to create a calendar permission for a specific calendar in a calendar group. Use when granting access to a calendar for another user. |
| `OUTLOOK_CREATE_CAL_GROUP_EVENT_ATTACH_UPLOAD` | Create calendar group event attachment upload session | Tool to create an upload session for large calendar group event attachments. Use when attaching files larger than 3 MB to events in calendar groups. |
| `OUTLOOK_CREATE_CONTACT` | Create contact | Creates a new contact in a Microsoft Outlook user's contacts folder. |
| `OUTLOOK_CREATE_CONTACT_FOLDER` | Create contact folder | Tool to create a new contact folder in the user's mailbox. Use when needing to organize contacts into custom folders. |
| `OUTLOOK_CREATE_CONTACT_FOLDER_CHILD_FOLDER` | Create user contact folder child folder | Tool to create a child contact folder within a parent contact folder for a specific user. Use when you need to organize contacts into nested folder hierarchies for a given user. |
| `OUTLOOK_CREATE_DRAFT` | Create email draft | Creates a new Outlook email draft with subject, body, recipients, and an optional attachment. This action creates a standalone draft for new conversations. To create a draft reply to an existing conversation/message, use the OUTLOOK_CREATE_DRAFT_REPLY action instead. |
| `OUTLOOK_CREATE_DRAFT_REPLY` | Create a draft reply | Creates a draft reply in the specified user's Outlook mailbox to an existing message (identified by a valid `message_id`), optionally including a `comment` and CC/BCC recipients. |
| `OUTLOOK_CREATE_EMAIL_RULE` | Create Email Rule | Create email rule filter with conditions and actions |
| `OUTLOOK_CREATE_EVENT_ATTACHMENT` | Create user calendar event attachment | Tool to create a new attachment for a user's calendar event. Use when you need to attach a file or item to an existing event in a specific user's calendar. |
| `OUTLOOK_CREATE_EVENT_ATTACHMENT_UPLOAD_SESSION` | Create event attachment upload session | Tool to create an upload session for large calendar event attachments. Use when attaching files larger than 3 MB to Outlook calendar events. |
| `OUTLOOK_CREATE_FORWARD_DRAFT` | Create user mail folder message forward draft | Tool to create a forward draft of an Outlook message for a specific user. Use when you need to prepare a forward email that can be edited before sending. The draft is created in the Drafts folder with the FW: prefix in the subject line. |
| `OUTLOOK_CREATE_MAIL_FOLDER` | Create mail folder | Tool to create a new mail folder. Use when you need to organize email into a new folder. |
| `OUTLOOK_CREATE_MAIL_FOLDER_MESSAGE` | Create message in mail folder | Tool to create a new message in a specific mail folder. Use when you need to create a draft message in a particular folder (e.g., drafts, custom folders). |
| `OUTLOOK_CREATE_MAIL_FOLDER_MESSAGE_ATTACHMENT` | Create mail folder message attachment | Tool to add an attachment to a message in a specific mail folder. Use when you need to attach a file to a message located in a particular mail folder. |
| `OUTLOOK_CREATE_MAIL_FOLDER_MESSAGE_ATTACHMENT_UPLOAD_SESSION` | Create mail folder message attachment upload session | Tool to create an upload session for large (>3 MB) message attachments in a specific mail folder. Use when you need to upload attachments in chunks to a message located in a mail folder. |
| `OUTLOOK_CREATE_MAIL_FOLDER_MESSAGE_RULE` | Create User Mail Folder Message Rule | Tool to create a message rule in a user's mail folder. Use when automating message processing with filters and actions. |
| `OUTLOOK_CREATE_ME_CALENDAR_EVENT_EXTENSION` | Create user calendar event extension | Tool to create a new open extension on a calendar event for a specific user. Use when you need to store custom data with an event. |
| `OUTLOOK_CREATE_ME_CALENDAR_PERMISSION` | Create user calendar permission | Tool to create a new calendar permission for a specific user's calendar. Use when you need to share another user's calendar with someone or grant access with specific permission levels. |
| `OUTLOOK_CREATE_ME_CHILD_FOLDER_MESSAGE` | Create message in user's child folder | Tool to create a new draft message in a child folder within a user's mail folder. Use when creating messages in nested folder structures for a specific user's mailbox. |
| `OUTLOOK_CREATE_ME_CONTACT_FOLDERS_CONTACTS` | Create user contact in folder | Tool to create a new contact in a specific user's contact folder. Use when you need to add a contact to a particular folder for a specified user. |
| `OUTLOOK_CREATE_ME_CONTACT_FOLDERS_CONTACTS_EXTENSIONS` | Create user contact extension | Tool to create a new open extension on a contact within a user's contact folder. Use when you need to store custom data with a contact. |
| `OUTLOOK_CREATE_ME_CONTACT_FOLDERS_EXTENSIONS` | Create contact extension | Tool to create a new open extension on a contact within a child folder. Use when you need to store custom data with a contact. |
| `OUTLOOK_CREATE_ME_CONTACT_IN_CHILD_FOLDER` | Create contact in child folder | Tool to create a new contact in a child folder within a contact folder. Use when you need to add a contact to a specific nested folder structure. |
| `OUTLOOK_CREATE_ME_EVENT` | Create calendar event for user | Tool to create a new calendar event for a specific user. Use when you need to create events in a user's calendar. |
| `OUTLOOK_CREATE_ME_EVENT_ATTACHMENT_UPLOAD_SESSION` | Create me event attachment upload session | Tool to create an upload session for large event attachments. Use when attaching files larger than 3 MB to the authenticated user's Outlook events. |
| `OUTLOOK_CREATE_ME_FORWARD_DRAFT` | Create forward draft | Tool to create a draft forward of an existing message. Use when you need to prepare a forward that can be edited before sending. The draft can be updated with recipients and additional content before being sent. |
| `OUTLOOK_CREATE_ME_INFERENCE_CLASSIFICATION_OVERRIDE` | Create user Focused Inbox override | Tool to create a Focused Inbox override for a sender identified by SMTP address for a specific user. Use when you need to configure messages from a specific sender to always be classified as focused or other for a particular user. |
| `OUTLOOK_CREATE_ME_MESSAGE_REPLY_ALL_DRAFT` | Create reply-all draft for user message | Tool to create a draft reply-all to a user's message. Use when you need to create a draft reply to the sender and all recipients of an email message in a user's mailbox. |
| `OUTLOOK_CREATE_ME_REPLY_ALL_DRAFT` | Create reply-all draft for child folder message | Tool to create a draft reply-all to a message in a child folder. Use when you need to create a draft reply to the sender and all recipients of a message located in a subfolder within a mail folder. |
| `OUTLOOK_CREATE_MESSAGE_ATTACHMENT` | Create message attachment | Tool to create an attachment for a message. Use when you need to attach a file or item to an existing message. Supports file attachments, item attachments, and reference attachments. |
| `OUTLOOK_CREATE_REPLY_ALL_DRAFT` | Create reply-all draft in folder | Tool to create a reply-all draft for a message in a mail folder. Use when you need to create a draft reply to all recipients of an email. |
| `OUTLOOK_CREATE_TASK` | Create To Do task | Tool to create a new task in Microsoft To Do within a specified task list. Use when adding tasks with title, due dates, reminders, importance levels, descriptions, categories, and linked resources. |
| `OUTLOOK_CREATE_USER_CALENDAR_EVENT_ATTACHMENT` | Create user calendar event attachment | Tool to create a new attachment for an event in a specific user's calendar. Use when you need to attach a file or item to an event within a particular user's calendar. |
| `OUTLOOK_CREATE_USER_CALENDAR_GROUP_CALENDAR` | Create calendar in user's calendar group | Tool to create a new calendar in a calendar group for a specific user. Use when organizing events into a separate calendar within a specific calendar group for a user. |
| `OUTLOOK_CREATE_USER_CALENDAR_GROUP_EVENT` | Create user calendar group event | Tool to create a new calendar event in a specific user's calendar within a calendar group. Use when creating events for a particular user in a calendar that belongs to a calendar group. |
| `OUTLOOK_CREATE_USER_CONTACTS_EXTENSIONS` | Create user contact extension | Tool to create a new open extension on a specific user's contact. Use when you need to store custom data with a contact for a specific user. |
| `OUTLOOK_CREATE_USER_EVENT_CALENDAR_PERMISSION` | Create calendar permission via event | Tool to create a calendar permission via an event's calendar. Use when granting calendar access through an event by specifying the event ID and user email address. |
| `OUTLOOK_CREATE_USER_MAIL_CHILD_FOLDER_MSG_EXT` | Create user message extension | Tool to create a new open extension on a message in a child mail folder for any user. Use when you need to store custom data with a message in a nested folder structure. |
| `OUTLOOK_CREATE_USER_MAIL_FOLDER_MESSAGE_EXTENSION` | Create user mail folder message extension | Tool to create a new open extension on a message in a user's mail folder. Use when you need to store custom data with a specific message in a user's mailbox. |
| `OUTLOOK_CREATE_USER_MAIL_FOLDER_MESSAGE_REPLY_DRAFT` | Create reply draft for user mail folder message | Tool to create a reply draft for a message in a user's mail folder. Use when you need to prepare a reply without sending it immediately. The draft is created in the Drafts folder and includes the RE: prefix in the subject line. |
| `OUTLOOK_CREATE_USER_MAIL_FOLDERS_CHILD_FOLDERS` | Create user mail folders child folders | Tool to create a new child folder under a specified mail folder for a user. Use when organizing email into nested folder hierarchies within a specific user's mailbox. |
| `OUTLOOK_CREATE_USER_MASTER_CATEGORY` | Create user master category | Tool to create a new category in a user's master category list. Use when you need to add a category to organize email and calendar items for a specific user. |
| `OUTLOOK_CREATE_USER_MESSAGE` | Create user message | Tool to create a new draft message in a user's mailbox. Use when creating draft messages for a specific user or the authenticated user. |
| `OUTLOOK_CREATE_USER_MESSAGE_ATTACHMENT` | Create user message attachment | Tool to create an attachment on a message in a user's mail folder. Use when you need to attach a file or item to an existing message in a specific user's mailbox. |
| `OUTLOOK_DECLINE_EVENT` | Decline calendar event | Tool to decline an invitation to a calendar event. Use when the user wants to decline a meeting or event invitation. The API returns 202 Accepted with no content on success. |
| `OUTLOOK_DELETE_CALENDAR` | Delete calendar | Tool to delete a calendar other than the default calendar from a user's mailbox. Use when removing calendars that are no longer needed. |
| `OUTLOOK_DELETE_CALENDAR_EVENT` | Delete calendar event | Tool to delete a calendar event from a user's Outlook calendar. Use when removing events that are no longer needed or were created in error. |
| `OUTLOOK_DELETE_CALENDAR_EVENT_ATTACHMENT` | Delete user calendar event attachment | Delete user calendar event attachment |
| `OUTLOOK_DELETE_CALENDAR_EVENT_FROM_SPECIFIC_CALENDAR` | Delete event from specific calendar | Tool to delete an event from a specific calendar in Outlook. Use when removing events from secondary or shared calendars by providing both calendar ID and event ID. |
| `OUTLOOK_DELETE_CALENDAR_FROM_GROUP` | Delete user calendar group calendar | Tool to delete a calendar from a specific user's calendar group in Microsoft Outlook. Use when removing a calendar that belongs to a user's calendar group. |
| `OUTLOOK_DELETE_CALENDAR_GROUP` | Delete calendar group | Tool to delete a calendar group other than the default calendar group. Use when removing unused calendar groups from the mailbox. |
| `OUTLOOK_DELETE_CALENDAR_GROUP_CALENDAR_EVENT` | Delete user calendar group calendar event | Tool to delete a calendar event from a specific user's calendar within a calendar group. Use when removing events from calendars organized under calendar groups for a specific user. |
| `OUTLOOK_DELETE_CALENDAR_GROUP_EVENT_ATTACHMENT` | Delete calendar group event attachment | Tool to delete an attachment from an event in a calendar within a calendar group. Use when you need to remove a file or item attachment from an event in a specific calendar group. |
| `OUTLOOK_DELETE_CALENDAR_GROUP_EVENT_PERMANENTLY` | Permanently Delete Calendar Group Event | Tool to permanently delete a calendar event from a calendar within a calendar group. Use when you need to ensure an event cannot be restored from deleted items. |
| `OUTLOOK_DELETE_CALENDAR_PERMANENTLY` | Permanently Delete Calendar | Permanently deletes a calendar from a user's mailbox. Unlike standard DELETE, this action makes the calendar permanently unrecoverable. Use when you need to ensure a calendar cannot be restored from deleted items. |
| `OUTLOOK_DELETE_CALENDAR_PERMISSION` | Delete User Calendar Group Calendar Permission | Tool to delete a calendar permission from a user's calendar within a calendar group. Use when revoking calendar sharing access for specific users. |
| `OUTLOOK_DELETE_CHILD_CONTACT_FOLDER_PERMANENTLY` | Permanently Delete Child Contact Folder | Permanently deletes a child contact folder. Unlike standard DELETE, this action makes the folder permanently unrecoverable. Use when you need to ensure a child contact folder cannot be restored from deleted items. |
| `OUTLOOK_DELETE_CHILD_FOLDER_MESSAGE` | Delete Child Folder Message | Tool to delete a message from a child mail folder in Outlook. Use when removing messages from nested folder structures or cleaning up messages in subfolders. |
| `OUTLOOK_DELETE_CONTACT` | Delete Contact | Permanently deletes an existing contact, using its `contact_id` (obtainable via 'List User Contacts' or 'Get Contact'), from the Outlook contacts of the user specified by `user_id`. |
| `OUTLOOK_DELETE_CONTACT_FOLDER` | Delete contact folder | Tool to delete a contact folder from the user's mailbox. Use when you need to remove an existing contact folder. |
| `OUTLOOK_DELETE_CONTACT_FOLDER_CHILD_FOLDER` | Delete user contact folder child folder | Tool to delete a child contact folder from a parent contact folder for a specific user. Use when removing nested contact folders from a user's mailbox. |
| `OUTLOOK_DELETE_CONTACT_FOLDER_CONTACT` | Delete Contact from Folder | Tool to permanently delete a contact from a specific contact folder. Use when removing contacts from organized folders in Outlook. |
| `OUTLOOK_DELETE_CONTACT_FOLDER_PERMANENTLY` | Permanently Delete Contact Folder | Permanently deletes a contact folder. Unlike standard DELETE, this action makes the folder permanently unrecoverable. Use when you need to ensure a contact folder cannot be restored from deleted items. |
| `OUTLOOK_DELETE_CONTACT_FROM_CHILD_FOLDER_PERMANENTLY` | Permanently Delete User Contact from Child Folder | Tool to permanently delete a contact from a child folder for a specific user. Use when you need to ensure a contact cannot be restored from deleted items. |
| `OUTLOOK_DELETE_CONTACT_FROM_FOLDER_PERMANENTLY` | Permanently Delete Contact from Folder | Permanently deletes a contact from a specific contact folder. Unlike standard DELETE, this action makes the contact permanently unrecoverable. Use when you need to ensure a contact in a folder cannot be restored from deleted items. |
| `OUTLOOK_DELETE_CONTACT_PERMANENTLY` | Permanently Delete Contact | Permanently deletes a contact. Unlike standard DELETE, this action makes the contact permanently unrecoverable. Use when you need to ensure a contact cannot be restored from deleted items. |
| `OUTLOOK_DELETE_CONTACTS_EXTENSIONS` | Delete contact extension | Tool to delete a navigation property extension from a contact within a child folder. Use when removing custom extension data from a contact. |
| `OUTLOOK_DELETE_EMAIL_RULE` | Delete Email Rule | Delete an email rule permanently; deletion is irreversible. Confirm rule details with the user before executing. Removing a rule may alter the firing order and stop-processing behavior of remaining rules. |
| `OUTLOOK_DELETE_EVENT_ATTACHMENT` | Delete event attachment | Tool to delete an attachment from an Outlook calendar event. Use when you need to remove a file or item attachment from an existing event. |
| `OUTLOOK_DELETE_EVENT_EXTENSION` | Delete event extension | Tool to delete an open extension from a calendar event in a calendar group. Use when removing custom extension data that is no longer needed. |
| `OUTLOOK_DELETE_EVENT_PERMANENTLY` | Permanently Delete Event | Permanently deletes a calendar event. Unlike standard DELETE, this action makes the event permanently unrecoverable. Use when you need to ensure an event cannot be restored from deleted items. |
| `OUTLOOK_DELETE_MAIL_FOLDER` | Delete mail folder | Delete a mail folder from the user's mailbox. Use when you need to remove an existing mail folder. |
| `OUTLOOK_DELETE_MAIL_FOLDER_MESSAGE` | Delete Mail Folder Message | Tool to delete a message from a specific mail folder in Outlook. Use when removing messages from a particular folder or cleaning up folder contents. |
| `OUTLOOK_DELETE_MASTER_CATEGORY` | Delete master category | Tool to delete a category from the user's master category list. Use when removing unused or obsolete categories from the mailbox. |
| `OUTLOOK_DELETE_ME_CALENDAR_PERMISSION` | Delete User Calendars Calendar Permission | Tool to delete a calendar permission from a specific user's calendar. Use when revoking access to a shared calendar. |
| `OUTLOOK_DELETE_ME_CONTACT_EXTENSION` | Delete contact extension | Tool to delete an open extension from a contact. Use when removing custom data extensions that are no longer needed. |
| `OUTLOOK_DELETE_ME_CONTACT_FOLDER_CONTACT_EXTENSION` | Delete user contact folder contact extension | Tool to delete an extension from a contact in a user's contact folder. Use when removing custom extension data from a contact. |
| `OUTLOOK_DELETE_ME_EVENT_EXTENSION` | Delete user event extension | Tool to delete an open extension from a user's calendar event. Use when removing custom extension data that is no longer needed. |
| `OUTLOOK_DELETE_ME_EVENTS_ATTACHMENTS` | Delete user event attachment | Tool to delete an attachment from a user's Outlook event. Use when you need to remove a file or item attachment from an existing event. |
| `OUTLOOK_DELETE_ME_INFERENCE_CLASSIFICATION_OVERRIDE` | Delete inference classification override | Tool to delete an inference classification override for a specific sender. Use when removing custom Focused Inbox rules that were previously set. |
| `OUTLOOK_DELETE_ME_MAIL_FOLDER_CHILD_FOLDER` | Delete mail folder child folder | Tool to delete a child mail folder from a parent mail folder. Use when removing nested mail folders from a user's mailbox. |
| `OUTLOOK_DELETE_ME_MAIL_FOLDER_CHILD_FOLDER_PERMANENTLY` | Permanently Delete Child Mail Folder | Permanently deletes a child mail folder from a parent mail folder. Unlike standard DELETE, this action makes the folder permanently unrecoverable. Use when you need to ensure a child folder cannot be restored from deleted items. |
| `OUTLOOK_DELETE_ME_MAIL_FOLDER_MESSAGE_RULE` | Delete mail folder message rule | Tool to delete a message rule from a specific mail folder. Use when you need to remove an email automation rule from a folder. |
| `OUTLOOK_DELETE_ME_MAIL_FOLDERS_CHILD_FOLDERS_MESSAGES_EXTENS` | Delete user message extension | Delete user message extension |
| `OUTLOOK_DELETE_ME_MAIL_FOLDERS_MESSAGES_EXTENSIONS` | Delete message extension | Tool to delete a navigation property extension from a message within a mail folder. Use when removing custom extension data from a message. |
| `OUTLOOK_DELETE_ME_MESSAGES_ATTACHMENTS` | Delete Message Attachment | Tool to delete an attachment from a message. Use when removing file or item attachments from messages in Outlook. |
| `OUTLOOK_DELETE_MESSAGE` | Delete Message | Tool to permanently delete an Outlook email message by its message_id. Use when removing unwanted messages, cleaning up drafts, or performing mailbox maintenance. |
| `OUTLOOK_DELETE_MESSAGE_ATTACHMENT` | Delete Message Attachment | Tool to delete an attachment from a message in a nested mail folder structure. Use when removing attachments from messages located in child folders within mail folders. |
| `OUTLOOK_DELETE_MESSAGE_EXTENSION` | Delete message extension | Tool to delete an open extension from an Outlook message. Use when removing custom extension data that is no longer needed from a message. |
| `OUTLOOK_DELETE_PRIMARY_CALENDAR_PERMISSION` | Delete User Calendar Permission | Tool to delete a calendar permission from a specific user's calendar. Use when revoking calendar sharing access for a particular user. |
| `OUTLOOK_DELETE_USER_CALENDAR_EVENT_PERMANENTLY` | Permanently Delete User Calendar Event | Tool to permanently delete a calendar event from a specific user's calendar. Use when you need to ensure an event cannot be restored from deleted items. |
| `OUTLOOK_DELETE_USER_CHILD_FOLDER_CONTACT` | Delete Contact from User's Child Folder | Tool to delete a contact from a child folder in a user's contact folder. Use when you need to remove a contact from a specific child folder within a contact folder. |
| `OUTLOOK_DELETE_USER_CHILD_FOLDER_MESSAGE_PERMANENTLY` | Delete User Child Folder Message Permanently | Tool to permanently delete a message from a user's child mail folder in Outlook. Unlike standard DELETE, this action makes the message unrecoverable by moving it to the Purges folder in the dumpster. Use when you need to ensure a message in a nested folder cannot be restored from deleted items. |
| `OUTLOOK_DELETE_USER_EVENT_PERMANENTLY` | Permanently Delete User Event | Tool to permanently delete a calendar event for a specified user. Use when you need to ensure an event cannot be restored from deleted items. |
| `OUTLOOK_DELETE_USER_MAIL_FOLDER_PERMANENTLY` | Permanently Delete User Mail Folder | Permanently deletes a mail folder for a specific user. Unlike standard DELETE, this action makes the folder permanently unrecoverable. Use when you need to ensure a user's folder cannot be restored from deleted items. |
| `OUTLOOK_DISMISS_CALENDAR_EVENT_REMINDER` | Dismiss user calendar event reminder | Tool to dismiss a reminder for a specific event in a user's calendar. Use when you need to turn off or remove a reminder alert for an event in a specific user's calendar. |
| `OUTLOOK_DISMISS_EVENT_REMINDER` | Dismiss event reminder | Tool to dismiss a reminder for a specific calendar event. Use when you need to turn off or remove a reminder alert for an event. |
| `OUTLOOK_DISMISS_EVENT_REMINDER_FROM_GROUP` | Dismiss user calendar group event reminder | Tool to dismiss a reminder for an event in a user's calendar within a calendar group. Use when you need to turn off a reminder for an event in a specific user's calendar group. |
| `OUTLOOK_DISMISS_USER_EVENT_REMINDER` | Dismiss user event reminder | Tool to dismiss a reminder for a specific user's calendar event. Use when you need to turn off or remove a reminder alert for an event in a user's calendar. |
| `OUTLOOK_DOWNLOAD_OUTLOOK_ATTACHMENT` | Download Outlook attachment | Downloads a specific file attachment from an email message in a Microsoft Outlook mailbox; the attachment must contain 'contentBytes' (binary data) and not be a link or embedded item. The returned data.file.s3url is temporary — download the file immediately after calling this tool; call again to get a fresh URL if needed. High-volume parallel calls may trigger HTTP 429 responses; honor the Retry-After header and use exponential backoff. |
| `OUTLOOK_FIND_MEETING_TIMES` | Find Meeting Times | Suggests meeting times based on organizer and attendee availability, time constraints, and duration requirements. Use when you need to find optimal meeting slots across multiple participants' schedules. |
| `OUTLOOK_FORWARD_MESSAGE` | Forward message | Tool to forward a message. Use when you need to send an existing email to new recipients. |
| `OUTLOOK_FORWARD_USER_CALENDAR_EVENT` | Forward user calendar event | Tool to forward a calendar event from a specific user's calendar to new recipients. Use when you need to share an event from a particular calendar with additional people. |
| `OUTLOOK_GET_CALENDAR_EVENT` | Get event from calendar | Tool to retrieve a specific event from a specified calendar. Use when you need to get details of an event that belongs to a specific calendar in the user's mailbox. |
| `OUTLOOK_GET_CALENDAR_EVENT_ATTACHMENT` | Get calendar event attachment | Tool to retrieve a specific attachment from an event within a calendar. Use when you need to access attachment content from a calendar event. |
| `OUTLOOK_GET_CALENDAR_FROM_EVENT` | Get calendar from event | Tool to retrieve the parent calendar that contains a specific event. Use when you need to get calendar details for a specific event in a calendar. |
| `OUTLOOK_GET_CALENDAR_FROM_GROUP` | Get calendar from calendar group | Tool to retrieve a specific calendar from a calendar group in Microsoft Outlook. Use when you need to get details of a calendar that belongs to a specific calendar group. |
| `OUTLOOK_GET_CALENDAR_GROUP` | Get calendar group | Tool to retrieve the properties and relationships of a calendar group object. Use when you need to get details of a specific calendar group by its ID. |
| `OUTLOOK_GET_CALENDAR_GROUP_CALENDAR_EVENT_EXTENSION` | Get event extension | Tool to retrieve an open extension from a calendar event within a specific calendar group and calendar. Use when you need to access custom data stored with an event. |
| `OUTLOOK_GET_CALENDAR_GROUP_SCHEDULE` | Get User Calendar Group Schedule | Tool to retrieve free/busy schedule information for a specific user's calendar within a calendar group. Use when you need availability data from a particular user's calendar that belongs to a calendar group. |
| `OUTLOOK_GET_CALENDAR_PERMISSION` | Get user calendar permission | Tool to retrieve a specific calendar permission for a user's calendar. Use when you need to check who has access to a specific user's calendar and their permission level. |
| `OUTLOOK_GET_CALENDAR_PERMISSION_FROM_CALENDAR` | Get user calendar permission | Tool to retrieve a specific calendar permission from a user's calendar. Use when you need to check who has access to a specific user's calendar and their permission level. |
| `OUTLOOK_GET_CALENDAR_SCHEDULE` | Get Calendar Schedule | Tool to get free/busy schedule information for users, distribution lists, or resources. Use when you need to check availability for specific people or resources during a time period. |
| `OUTLOOK_GET_CALENDAR_VIEW` | Get Calendar View | Get events ACTIVE during a time window (includes multi-day events). Use for "what's on my calendar today/this week" or availability checks. Returns events overlapping the time range. For keyword search or filters by category, use OUTLOOK_LIST_EVENTS instead. |
| `OUTLOOK_GET_CHILD_FOLDER_MESSAGE` | Get child folder message | Tool to retrieve a specific email message from a child mail folder. Use when you need to access a message in a nested folder hierarchy. |
| `OUTLOOK_GET_CHILD_FOLDER_MESSAGE_CONTENT` | Get child folder message MIME content | Tool to get the MIME content of a message from a child mail folder. Use when you need to download the raw MIME format of an email message for analysis or archival. |
| `OUTLOOK_GET_CHILD_MAIL_FOLDER` | Get child mail folder | Tool to retrieve a specific child mail folder from a parent mail folder. Use when you need details about a specific subfolder within a folder hierarchy. |
| `OUTLOOK_GET_CONTACT_EXTENSION` | Get contact extension | Tool to retrieve an open extension from a contact in Microsoft Graph. Use when you need to access custom data stored with a contact. |
| `OUTLOOK_GET_CONTACT_FOLDER` | Get contact folder | Tool to retrieve a specific contact folder by ID. Use when you need details about a particular contact folder in the user's mailbox. |
| `OUTLOOK_GET_CONTACT_FOLDERS` | List user contact folders | Tool to retrieve contact folders from a specific user's mailbox. Use when you need to list or browse contact folders for a given user. |
| `OUTLOOK_GET_CONTACT_FROM_FOLDER` | Get contact from folder | Tool to retrieve a specific contact from a contact folder by its ID. Use when you need to access contact details from a specific folder rather than the default contacts location. |
| `OUTLOOK_GET_DRAFTS_MAIL_FOLDER` | Get drafts mail folder | Tool to get the drafts mail folder. Use when you need to retrieve details about the drafts folder such as item counts and folder ID. |
| `OUTLOOK_GET_EVENT` | Get calendar event | Retrieves the full details of a specific calendar event by its ID from a user's Outlook calendar, provided the event exists. |
| `OUTLOOK_GET_EVENT_ATTACHMENT` | Get event attachment | Tool to retrieve a specific attachment from an Outlook calendar event by attachment ID. Use when you need to download or access the content of a particular event attachment. |
| `OUTLOOK_GET_EVENT_CALENDAR_FROM_GROUP` | Get event calendar from calendar group | Tool to retrieve the calendar that contains a specific event within a calendar group. Use when you need to get calendar details for an event in a calendar group. |
| `OUTLOOK_GET_INFERENCE_CLASSIFICATION` | Get inference classification | Tool to get inference classification settings for the authenticated user. Use when you need to retrieve the Focused Inbox configuration and sender-specific overrides that determine message classification. |
| `OUTLOOK_GET_MAILBOX_SETTINGS` | Get mailbox settings | Tool to retrieve mailbox settings. Use when you need to view settings such as automatic replies, time zone, and working hours for the signed-in or specified user. |
| `OUTLOOK_GET_MAIL_DELTA` | Get mail delta | Retrieve incremental changes (delta) of messages in a mailbox. FIRST RUN: Returns ALL messages in folder (use top=50 to limit). Response has @odata.deltaLink. SUBSEQUENT: Pass stored deltaLink to get only NEW/UPDATED/DELETED messages since last sync. Properties available: id, subject, from, receivedDateTime, isRead, etc. NOT available: internetMessageHeaders, full body, attachment content (response size limits). |
| `OUTLOOK_GET_MAIL_FOLDER` | Get mail folder | Tool to retrieve a mail folder by ID or well-known name. Use when you need to get details about a specific folder such as item counts, size, and folder properties. |
| `OUTLOOK_GET_MAIL_FOLDER_MESSAGE` | Get mail folder message | Tool to retrieve a specific message from a mail folder by its ID. Use when you need to fetch full message details including subject, body, sender, recipients, timestamps, and other metadata from a specific mail folder. |
| `OUTLOOK_GET_MAIL_FOLDER_MESSAGE_RULE` | Get user mail folder message rule | Tool to retrieve a specific message rule from a user's mail folder. Use when you need details about an email rule in a particular user's folder. |
| `OUTLOOK_GET_MAIL_TIPS` | Get mail tips | Tool to retrieve mail tips such as automatic replies and mailbox full status. Use when you need to check recipient status before sending mail. |
| `OUTLOOK_GET_MASTER_CATEGORIES` | Get master categories | Tool to retrieve the user's master category list. Use when you need to get all categories defined for the user. |
| `OUTLOOK_GET_MASTER_CATEGORY` | Get master category | Tool to retrieve properties of a specific category from the user's master category list. Use when you need details about a specific category. |
| `OUTLOOK_GET_ME_CALENDAR` | Get user's default calendar | Tool to get the properties and relationships of the signed-in user's default calendar. Use when you need to retrieve calendar details for the authenticated user. |
| `OUTLOOK_GET_ME_CONTACT_FOLDERS_CHILD_FOLDER` | Get user child contact folder | Tool to retrieve a specific child contact folder for a user by ID. Use when you need details of a child folder nested within a parent contact folder for a specific user. |
| `OUTLOOK_GET_ME_CONTACT_FROM_CHILD_FOLDER` | Get contact from child folder | Tool to retrieve a specific contact from a nested child folder within a contact folder. Use when you need contact details from a child folder. |
| `OUTLOOK_GET_ME_CONTACT_PHOTO` | Get contact photo | Tool to get the binary media content of a contact's profile photo. Use when you need to download or retrieve a contact's picture. |
| `OUTLOOK_GET_ME_CONTACTS` | Get contact | Retrieves a specific Outlook contact by its `contact_id` from the contacts of a specified `user_id` (defaults to 'me' for the authenticated user). |
| `OUTLOOK_GET_ME_CONTACTS_EXTENSIONS` | Get user contact extension | Tool to retrieve a specific open extension from a user's contact. Use when you need to access custom data stored with a contact. |
| `OUTLOOK_GET_ME_EVENT_ATTACHMENT` | Get user event attachment | Tool to retrieve a specific attachment from a user's calendar event. Use when you need to access attachment details including content from a specific user's event. |
| `OUTLOOK_GET_ME_EVENT_CALENDAR` | Get event calendar | Tool to retrieve the calendar that contains a specific event. Use when you need to get calendar details for an event. |
| `OUTLOOK_GET_ME_MAIL_FOLDERS_MESSAGES_EXTENSIONS` | Get message extension | Tool to retrieve a specific extension from a message in a user's mailbox. Use when you need to read custom data stored in a message extension. |
| `OUTLOOK_GET_ME_MESSAGE_MIME_CONTENT` | Get message MIME content | Tool to get the MIME content of a message. Use when you need to download the raw MIME format of an email message for analysis or archival. |
| `OUTLOOK_GET_ME_OUTLOOK` | Get user outlook | Tool to retrieve the outlookUser object for a specified user. Use when you need to access the Outlook services entity for a user. |
| `OUTLOOK_GET_MESSAGE` | Get email message | Retrieves a specific email message by its ID from the specified user's Outlook mailbox. Use the 'select' parameter to include specific fields like 'internetMessageHeaders' for filtering automated emails. |
| `OUTLOOK_GET_MESSAGE_EXTENSION` | Get user message extension | Tool to retrieve a specific extension from a user's message. Use when you need to read custom data stored in a message extension. |
| `OUTLOOK_GET_NESTED_FOLDER_MESSAGE_ATTACHMENT` | Get attachment from nested folder message | Tool to retrieve a specific attachment from a message located in a nested mail folder structure. Use when you need to get attachment details from messages in deeply nested folders. |
| `OUTLOOK_GET_PROFILE` | Get Outlook profile | Retrieves the Microsoft Outlook profile for a specified user. |
| `OUTLOOK_GET_SCHEDULE` | Get schedule | Retrieves free/busy schedule information for specified email addresses within a defined time window. Read-only; does not reserve time or prevent conflicts — verify availability before creating events. |
| `OUTLOOK_GET_SUPPORTED_LANGUAGES` | Get supported languages | Tool to retrieve supported languages in the user's mailbox. Use when you need to display or select from available mailbox languages. |
| `OUTLOOK_GET_SUPPORTED_TIME_ZONES` | Get supported time zones | Tool to get the list of time zones supported for a user as configured on their mailbox server. Use when setting up an Outlook client or configuring user time zone preferences. |
| `OUTLOOK_GET_USER_CALENDAR` | Get user's calendar | Tool to get the properties and relationships of a specific calendar for a user. Use when you need to retrieve details for a particular calendar by its ID for any user. |
| `OUTLOOK_GET_USER_CALENDAR_ALLOWED_SHARING_ROLES` | Get allowed calendar sharing roles for user calendar | Tool to retrieve allowed calendar sharing roles for a specific user on a given calendar. Use when you need to determine what permission levels can be granted to a user for sharing a specific calendar. |
| `OUTLOOK_GET_USER_CALENDAR_EVENT` | Get user calendar event | Tool to retrieve a specific calendar event from a user's primary calendar. Use when you need detailed information about a particular event for a given user. |
| `OUTLOOK_GET_USER_CALENDAR_GROUP_CALENDAR_PERMISSION` | Get user calendar group calendar permission | Tool to retrieve a specific calendar permission for a user's calendar within a calendar group. Use when you need to check access permissions for a specific calendar. |
| `OUTLOOK_GET_USER_CALENDAR_GROUP_EVENT` | Get user calendar group event | Tool to retrieve a specific event from a user's calendar within a calendar group. Use when you need details of an event in a specific calendar group. |
| `OUTLOOK_GET_USER_CALENDAR_GROUP_EVENT_ATTACHMENT` | Get user calendar group event attachment | Tool to retrieve a specific attachment from an event within a calendar group for a user. Use when you need to access attachment content from a calendar event in a user's calendar group. |
| `OUTLOOK_GET_USER_CHILD_FOLDER_MESSAGE` | Get message from child folder | Tool to retrieve a specific message from a child folder within a user's mail folder hierarchy. Use when you need to access messages from nested folders where both parent and child folder IDs are known. |
| `OUTLOOK_GET_USER_EVENT_EXTENSION` | Get event extension | Tool to retrieve a specific open type extension from a user's calendar event by its extension ID or name. Use when you need to access custom data stored in calendar event extensions. |
| `OUTLOOK_GET_USER_MESSAGES_ATTACHMENTS` | Get user message attachment | Tool to retrieve a specific attachment from a message in a mail folder hierarchy. Use when you need to get attachment details including content from a specific folder path. |
| `OUTLOOK_LIST_CALENDAR_EVENT_ATTACHMENTS` | List user calendar event attachments | Tool to list attachments for a calendar event within a specific calendar for a user. Use when you need to retrieve attachments from an event in a user's specific calendar. |
| `OUTLOOK_LIST_CALENDAR_GROUP_CALENDAR_EVENTS` | List user calendar group calendar events | Tool to list events from a specific calendar within a calendar group for a user. Use when you need to retrieve events from a user's calendar that belongs to a specific calendar group. |
| `OUTLOOK_LIST_CALENDAR_GROUP_CALENDARS` | List calendars in calendar group | Tool to retrieve calendars belonging to a specific calendar group. Use when you need to list calendars within a calendar group with optional OData queries. |
| `OUTLOOK_LIST_CALENDAR_GROUP_EVENT_ATTACHMENTS` | List user calendar group event attachments | Tool to list attachments for a calendar event within a specific calendar group for a user. Use when you need to retrieve attachments from an event in a calendar that belongs to a calendar group for a specific user. |
| `OUTLOOK_LIST_CALENDAR_GROUPS` | List Outlook calendar groups | Tool to list calendar groups in the signed-in user's mailbox. Use when you need to retrieve calendar groups with optional OData queries. |
| `OUTLOOK_LIST_CALENDAR_PERMISSIONS` | List calendar permissions | Tool to list calendar permissions for a specific calendar within a calendar group. Use when you need to view sharing permissions for a calendar. |
| `OUTLOOK_LIST_CALENDARS` | List Outlook calendars | Tool to list calendars in the signed-in user's mailbox. Use when you need to retrieve calendars with optional OData queries. |
| `OUTLOOK_LIST_CALENDAR_VIEW_DELTA` | List calendar view delta | Tool to get calendar events that have been added, deleted, or updated in a calendar view. Use when you need to track changes to events within a specific time range. |
| `OUTLOOK_LIST_CHAT_MESSAGES` | List chat messages | Tool to list messages in a Teams chat. Use when you need message IDs to select a specific message for further actions. |
| `OUTLOOK_LIST_CHATS` | List Teams chats | Tool to list Teams chats. Use when you need chat IDs and topics to select a chat for further actions. |
| `OUTLOOK_LIST_CHILD_FOLDER_CONTACTS` | List user child folder contacts | Tool to retrieve contacts from a user's child contact folder. Use when you need to access contacts organized in nested folder structures for a specific user. |
| `OUTLOOK_LIST_CHILD_FOLDER_MESSAGES` | List child folder messages | Tool to list messages from a child folder within a parent mail folder. Use when you need to retrieve messages from a subfolder that exists within another folder. |
| `OUTLOOK_LIST_CHILD_MAIL_FOLDERS` | List child mail folders | Tool to list subfolders (childFolders) under a specified Outlook mail folder. Use when navigating nested folder hierarchies or checking if a folder has subfolders. |
| `OUTLOOK_LIST_CONTACT_FOLDER_CHILD_FOLDERS` | List contact folder child folders | Tool to list child folders under a specified contact folder. Use when navigating nested contact folder hierarchies or organizing contacts into subfolder structures. |
| `OUTLOOK_LIST_CONTACT_FOLDERS_DELTA` | List contact folders delta | Tool to get contact folders that have been added, deleted, or updated. Use when tracking changes to contact folder structure without fetching all folders each time. |
| `OUTLOOK_LIST_CONTACTS_DELTA` | List contacts delta | Retrieve incremental changes (delta) of contacts in a specified folder. Use when syncing contacts without fetching the entire set each time. FIRST RUN: Returns ALL contacts in folder. Response has @odata.deltaLink. SUBSEQUENT: Pass stored deltaLink to get only NEW/UPDATED/DELETED contacts since last sync. |
| `OUTLOOK_LIST_EMAIL_RULES` | List Email Rules | List all email rules from inbox. No server-side filtering is supported; all rule narrowing must be done client-side after retrieval. Each rule includes a `sequence` field defining execution order and may include a `stopProcessingRules` flag affecting downstream rule execution. |
| `OUTLOOK_LIST_EVENT_ATTACHMENTS` | List event attachments | Tool to list attachments for a specific Outlook calendar event. Use when you have an event ID and need to view its attachments. |
| `OUTLOOK_LIST_EVENT_CALENDAR_CALENDAR_PERMISSIONS` | List event calendar permissions | Tool to list calendar permissions for the calendar containing a specific event. Use when you need to see who has access to a calendar that contains a particular event. |
| `OUTLOOK_LIST_EVENT_INSTANCES` | List event instances | Tool to retrieve individual occurrences of a recurring calendar event within a specified time range. Use when you need to get specific instances of a recurring meeting or event series. |
| `OUTLOOK_LIST_EVENTS` | List events | Retrieves events from a user's Outlook calendar via Microsoft Graph API. Supports primary/secondary/shared calendars, pagination, filtering, property selection, sorting, and timezone specification. Use calendar_id to access non-primary calendars. |
| `OUTLOOK_LIST_INFERENCE_CLASSIFICATION_OVERRIDES` | List Inference Classification Overrides | Tool to list inference classification overrides that control Focused Inbox sender rules. Use when you need to see which senders are configured to always appear in Focused or Other inbox. |
| `OUTLOOK_LIST_MAIL_FOLDER_MESSAGE_ATTACHMENTS` | List mail folder message attachments | Tool to get attachments from a message in a specific mail folder. Use when you need to retrieve attachment metadata from a message located in a particular folder. |
| `OUTLOOK_LIST_MAIL_FOLDER_MESSAGE_RULES` | List mail folder message rules | Tool to list message rules for a specific mail folder. Use when you need to retrieve rules configured for a particular folder. |
| `OUTLOOK_LIST_MAIL_FOLDER_MESSAGES` | List mail folder messages | Tool to list messages from a specific mail folder including subfolders. Use when you need to retrieve messages from a particular folder or subfolder by its ID or well-known name. |
| `OUTLOOK_LIST_MAIL_FOLDERS` | List mail folders | Tool to list a user's top-level mail folders. Use when you need folders like Inbox, Drafts, Sent Items; set include_hidden_folders=True to include hidden folders. |
| `OUTLOOK_LIST_MAIL_FOLDERS_DELTA` | List mail folders delta | Tool to get incremental changes to mail folders. Use when you need to track additions, deletions, or updates to mail folders without fetching the entire folder list each time. |
| `OUTLOOK_LIST_ME_CALENDAR_PERMISSIONS` | List user calendar permissions | Tool to list calendar permissions for a specific user's calendar. Use when you need to see who has access to a user's calendar and their permission levels. |
| `OUTLOOK_LIST_MESSAGE_ATTACHMENTS_FROM_CHILD_FOLDER` | List message attachments from child folder | Tool to list attachments from a message in a nested child mail folder. Use when you need to retrieve attachment metadata from a message located in a subfolder. |
| `OUTLOOK_LIST_MESSAGES` | List Messages | Retrieves a list of email messages from a specified mail folder in an Outlook mailbox, with options for filtering (including by conversationId to get all messages in a thread), pagination, and sorting; ensure 'user_id' and 'folder' are valid, and all date/time strings are in ISO 8601 format. |
| `OUTLOOK_LIST_OUTLOOK_ATTACHMENTS` | List Outlook attachments | Lists metadata (name, size, contentType, isInline — but not `contentBytes`) for all attachments of a specified Outlook email message. Returns fileAttachment, itemAttachment, and referenceAttachment types; only fileAttachment entries support download via OUTLOOK_DOWNLOAD_OUTLOOK_ATTACHMENT. Results include inline images and signatures — filter by `isInline == false` and check `contentType` to identify real document attachments. Results are nested under `data.response_data.value`. |
| `OUTLOOK_LIST_PLACES` | List places | Retrieves a collection of place objects defined in a tenant by type. Places can include rooms, workspaces, buildings, floors, sections, desks, and room lists. When room_list_id is provided, returns only rooms or workspaces within that specific room list using the /places/{roomListId}/microsoft.graph.roomlist/rooms (or /workspaces) endpoint. Use this action when you need to discover available physical spaces or locations within an organization. Note: Before using this API, ensure that the Places settings are properly configured in the tenant. |
| `OUTLOOK_LIST_PRIMARY_CALENDAR_PERMISSIONS` | List primary calendar permissions | Tool to list calendar permissions from a user's primary calendar. Use when you need to see who has access to the primary calendar and their permission levels. |
| `OUTLOOK_LIST_REMINDERS` | List event reminders | Tool to retrieve reminders for events occurring within a specified time range. Use when you need to see upcoming reminders between two datetimes. |
| `OUTLOOK_LIST_SENT_ITEMS_MESSAGES` | List sent items messages | Tool to list all messages in the SentItems mail folder of the signed-in user's mailbox. Use when you need to retrieve sent messages with optional filtering and sorting. |
| `OUTLOOK_LIST_TO_DO_LISTS` | List To Do task lists | Tool to list Microsoft To Do task lists for the signed-in user. Use when you need to discover available task lists before listing or creating tasks. Returns todoTaskList objects with id and displayName that can be used in downstream operations. |
| `OUTLOOK_LIST_TODO_TASKS` | List tasks from a To Do list | Tool to list tasks within a specified Microsoft To Do task list, including status and due dates. Use when retrieving tasks from a specific To Do list. |
| `OUTLOOK_LIST_USER_CALENDAR_EVENT_INSTANCES` | List calendar event instances | Tool to retrieve instances (occurrences) of a recurring event from a specific calendar within a date range. Use when you need event instances from a particular calendar. |
| `OUTLOOK_LIST_USER_CALENDAR_EVENTS_ATTACHMENTS` | List user calendar event attachments | Tool to list attachments for a user's calendar event. Use when you need to retrieve all attachments from a specific event in a user's calendar. |
| `OUTLOOK_LIST_USER_CALENDAR_GROUP_EVENT_INSTANCES` | List event instances | Tool to list instances (occurrences) of a recurring event within a specified date range from a user's calendar in a calendar group. Use when you need to retrieve specific occurrences of a recurring event. |
| `OUTLOOK_LIST_USER_CALENDAR_GROUPS_CALENDAR_VIEW` | Get Calendar View from User Calendar Group | Tool to get calendar view from a specific calendar within a calendar group for a user. Use when retrieving events from a calendar that belongs to a calendar group. |
| `OUTLOOK_LIST_USER_CALENDARS_CALENDAR_PERMISSIONS` | List user calendar permissions | Tool to list calendar permissions for a specific user's specific calendar. Use when you need to see who has access to a user's calendar and their permission levels. |
| `OUTLOOK_LIST_USER_CALENDARS_EVENTS` | List user calendars events | Tool to retrieve events from a specific calendar for a user. Use when you need to list calendar events for a specific user by user ID and calendar ID. |
| `OUTLOOK_LIST_USER_CALENDAR_VIEW` | Get calendar view from user's calendar | Tool to get calendar view from a specific user's calendar. Use when you need to retrieve events that occur or overlap with a specified time window from a user's specific calendar by calendar ID. |
| `OUTLOOK_LIST_USER_CONTACTS` | List user contacts | Tool to retrieve contacts from a specific user's mailbox. Use when you need to list or browse contacts for a given user. |
| `OUTLOOK_LIST_USERS` | List users | Tool to list users in Microsoft Entra ID. Use when you need to retrieve a paginated list of users, optionally filtering or selecting specific properties. For single-user lookups, prefer a dedicated get-user tool — listing all users is significantly heavier and slower. |
| `OUTLOOK_MOVE_MAIL_FOLDER` | Move mail folder | Tool to move a mail folder and its contents to another mail folder. Use when you need to reorganize the folder hierarchy. |
| `OUTLOOK_MOVE_ME_MAIL_FOLDER` | Move child mail folder | Tool to move a child mail folder to a different parent folder. Use when you need to reorganize subfolders within the folder hierarchy. |
| `OUTLOOK_MOVE_MESSAGE` | Move message to folder | Move a message to another folder within the specified user's mailbox. Creates a new copy in the destination folder and removes the original. The message_id changes after a successful move; use the ID returned in the response for any subsequent operations on the moved message. High-volume parallel moves can trigger HTTP 429 (MailboxConcurrency) throttling; honor the Retry-After header. |
| `OUTLOOK_MOVE_MESSAGE_FROM_CHILD_FOLDER` | Move message from child folder | Tool to move a message from a child folder to another destination folder. Use when you need to move a message that exists within a specific folder hierarchy (parent folder → child folder → message). |
| `OUTLOOK_MOVE_MESSAGE_FROM_FOLDER` | Move message from folder | Tool to move a message from a specific mail folder to another destination folder. Use when you need to move a message and know both the source folder ID and the message ID. |
| `OUTLOOK_PERMANENT_DELETE_MESSAGE` | Permanently Delete Message | Permanently deletes an Outlook message by moving it to the Purges folder in the dumpster. Unlike standard DELETE, this action makes the message unrecoverable by the user. IMPORTANT: This is NOT the same as DELETE - permanentDelete is irreversible and availability differs by national cloud deployments (not available in US Government L4, L5 (DOD), or China (21Vianet)). |
| `OUTLOOK_PIN_MESSAGE` | Pin message | Tool to pin a message in an Outlook chat. Use when you want to mark an important message for quick access. |
| `OUTLOOK_QUERY_EMAILS` | Query Emails | Query Outlook emails within a SINGLE folder using OData filters. Build precise server-side filters for dates, read status, importance, subjects, attachments, and conversations. Best for structured queries on message metadata within a specific folder. Returns up to 100 messages per request with pagination support. • Searches SINGLE folder only (inbox, sentitems, etc.) - NOT across all folders • For cross-folder/mailbox-wide search: Use OUTLOOK_SEARCH_MESSAGES • Server-side filters: dates, importance, isRead, hasAttachments, subjects, conversationId • CRITICAL: Always check response['@odata.nextLink'] for pagination • Limitations: Recipient/body filtering requires OUTLOOK_SEARCH_MESSAGES |
| `OUTLOOK_REPLY_EMAIL` | Reply to Email | Sends a reply to an Outlook email message with optional HTML formatting, identified by `message_id`, allowing optional CC and BCC recipients. |
| `OUTLOOK_SEARCH_MESSAGES` | Search Outlook messages | Search Outlook messages using powerful KQL syntax. Supports sender (from:), recipient (to:, cc:), subject, date filters (received:, sent:), attachments, and boolean logic. Only works with Microsoft 365/Enterprise accounts (no @hotmail.com/@outlook.com). Examples: 'from:user@example.com AND received>=2025-10-01', 'to:info@jcdn.nl AND subject:invoice', 'received>today-30 AND hasattachment:yes' |
| `OUTLOOK_SEND_DRAFT` | Send draft | Tool to send an existing draft message. Use after creating a draft when you want to deliver it to recipients immediately. Example: Send a draft message with ID 'AAMkAG…'. |
| `OUTLOOK_SEND_EMAIL` | Send email | Sends an email with subject, body, recipients, and optional attachments via Microsoft Graph API. Supports comma-separated email addresses in the to_email field for multiple recipients. Accepts either a single file or a list of files as attachments. Attachments require a non-empty file with valid name and mimetype. |
| `OUTLOOK_SNOOZE_CALENDAR_GROUP_EVENT_REMINDER` | Snooze user calendar group event reminder | Tool to snooze a reminder for a user's calendar event within a calendar group to a new time. Use when you need to postpone an event reminder for a specific user's calendar that belongs to a calendar group. |
| `OUTLOOK_SNOOZE_EVENT_REMINDER` | Snooze event reminder | Tool to postpone an event reminder until a new time. Use when you need to delay a reminder for a calendar event. |
| `OUTLOOK_SNOOZE_USER_CALENDAR_EVENT_REMINDER` | Snooze user calendar event reminder | Tool to snooze a reminder for a calendar event in a specific user calendar to a new time. Use when you need to postpone an event reminder for a specific calendar. |
| `OUTLOOK_SNOOZE_USER_EVENT_REMINDER` | Snooze user event reminder | Tool to snooze a reminder for a user's calendar event to a new time. Use when you need to postpone an event reminder for a specific user. |
| `OUTLOOK_UPDATE_CALENDAR_EVENT` | Update calendar event | Updates specified fields of an existing Outlook calendar event. Implementation note: To avoid unintentionally clearing properties, the action first fetches the existing event, merges only the provided fields, and then PATCHes the merged updates. Unspecified fields remain unchanged. |
| `OUTLOOK_UPDATE_CALENDAR_EVENT_IN_CALENDAR` | Update event in specific calendar | Tool to update an event in a specific Outlook calendar. Use when you need to modify event details like subject, time, attendees, or location in a non-default calendar. |
| `OUTLOOK_UPDATE_CALENDAR_GROUP` | Update calendar group | Tool to update the properties of a calendar group object. Use when you need to rename a calendar group. |
| `OUTLOOK_UPDATE_CALENDAR_GROUP_CALENDAR_PERMISSION` | Update Calendar Group Calendar Permission | Tool to update a calendar permission within a calendar group. Use when changing access levels for calendars in specific groups. |
| `OUTLOOK_UPDATE_CALENDAR_GROUPS_CALENDARS` | Update user calendar in calendar group | Tool to update a calendar within a calendar group in a user's mailbox. Use when modifying calendar properties like name, color, or default calendar status. |
| `OUTLOOK_UPDATE_CALENDAR_GROUPS_CALENDARS_EVENTS` | Update user calendar group event | Tool to update an event in a calendar within a calendar group for a specific user. Use when modifying event details for a user's calendar. |
| `OUTLOOK_UPDATE_CALENDAR_PERMISSION` | Update calendar permission | Tool to update calendar permission levels for share recipients or delegates. Use when you need to change the access level (role) for someone who has been granted access to a calendar. |
| `OUTLOOK_UPDATE_CHILD_FOLDER_CONTACT` | Update child folder contact | Tool to update a contact in a child contact folder within a parent contact folder. Use when you need to modify contact properties such as name, email, phone numbers, or company details for contacts in nested folder structures. |
| `OUTLOOK_UPDATE_CONTACT` | Update Contact | Updates an existing Outlook contact, identified by `contact_id` for the specified `user_id`, requiring at least one other field to be modified. |
| `OUTLOOK_UPDATE_CONTACT_FOLDER` | Update user contact folder | Tool to update the properties of a contact folder for a specific user. Use when you need to rename or move an existing contact folder. |
| `OUTLOOK_UPDATE_CONTACT_FOLDER_CHILD_FOLDER` | Update user contact folder child folder | Tool to update a child folder within a contact folder for a specific user. Use when you need to rename a child contact folder or move it to a different parent folder. |
| `OUTLOOK_UPDATE_CONTACT_FOLDERS_CONTACTS` | Update contact in folder | Tool to update a contact within a specific contact folder. Use when you need to modify contact details for a contact stored in a particular folder. |
| `OUTLOOK_UPDATE_EMAIL` | Update email message | Updates specified properties of an existing email message; `message_id` must identify a valid message within the specified `user_id`'s mailbox. |
| `OUTLOOK_UPDATE_EMAIL_RULE` | Update Email Rule | Update an existing email rule |
| `OUTLOOK_UPDATE_EVENT_EXTENSION` | Update event extension | Tool to update an open extension on a calendar event in Microsoft Graph. Use when you need to modify custom properties stored in an event extension. |
| `OUTLOOK_UPDATE_EVENT_EXTENSION_IN_CALENDAR_GROUP` | Update event extension in calendar group | Tool to update an open extension on a calendar event within a calendar group. Use when modifying custom properties stored in an event extension for events in calendar groups. |
| `OUTLOOK_UPDATE_INFERENCE_CLASSIFICATION` | Update Inference Classification | Tool to update the inferenceClassification resource for a user. Use when needing to refresh or sync the Focused Inbox classification settings. Note: The inferenceClassification resource has no writable properties; actual message classification rules are managed through the overrides collection. |
| `OUTLOOK_UPDATE_MAILBOX_SETTINGS` | Update mailbox settings | Tool to update mailbox settings for the signed-in user. Use when you need to configure automatic replies, default time zone, language, or working hours. Example: schedule automatic replies for vacation. |
| `OUTLOOK_UPDATE_MAIL_FOLDER` | Update mail folder | Tool to update the display name of a mail folder. Use when you need to rename an existing mail folder. |
| `OUTLOOK_UPDATE_MASTER_CATEGORY` | Update master category | Tool to update the color of a category in the user's master category list. Use when you need to change the color of an existing category. Note that the display name cannot be modified after creation. |
| `OUTLOOK_UPDATE_ME_CONTACTS_EXTENSIONS` | Update contact extension | Tool to update an open extension on a contact in a contact folder. Use when you need to modify custom properties stored in a contact extension. |
| `OUTLOOK_UPDATE_USER_CALENDAR` | Update user calendar | Tool to update the properties of a user's calendar. Use when you need to rename a calendar or change its color theme for a specific user. |
| `OUTLOOK_UPDATE_USER_CALENDAR_EVENT` | Update user calendar event | Tool to update an event in a specific user's calendar. Use when you need to modify calendar event properties for a user other than the signed-in user. |
| `OUTLOOK_UPDATE_USER_CALENDAR_PERMISSION` | Update user calendar permission | Tool to update calendar permission levels for a specific user's calendar. Use when you need to change the access level (role) for someone who has been granted access to a user's calendar. |
| `OUTLOOK_UPDATE_USER_CALENDARS` | Update user calendar by ID | Tool to update properties of a specific calendar by ID for a specific user. Use when you need to rename a user's calendar, change its color theme, or set it as the default calendar. |
| `OUTLOOK_UPDATE_USER_CHILD_FOLDER_MESSAGE` | Update user child folder message | Tool to update a message in a child folder within a user's mailbox. Use when you need to modify message properties such as isRead status, importance, categories, or subject for messages in nested folder structures for a specific user. |
| `OUTLOOK_UPDATE_USER_CONTACT_EXTENSION` | Update user contact extension | Tool to update an open extension on a contact in a user's contact folder. Use when you need to modify custom properties stored in a contact extension for a specific user. |
| `OUTLOOK_UPDATE_USER_CONTACTS_EXTENSIONS` | Update user contact extension | Tool to update an open extension on a contact in a user's contact folder. Use when you need to modify custom properties stored in a contact extension for a specific user. |
| `OUTLOOK_UPDATE_USER_CONTACTS_EXTENSIONS_DIRECT` | Update user contact extension (v3) | Tool to update an open extension on a contact directly under a user's contacts collection. Use when you need to modify custom properties stored in a contact extension. |
| `OUTLOOK_UPDATE_USER_EVENTS_EXTENSIONS` | Update user events extensions | Tool to update an open extension on a user's calendar event. Use when modifying custom properties stored in an event extension for a specific user. |
| `OUTLOOK_UPDATE_USER_INFERENCE_CLASSIFICATION_OVERRIDE` | Update User Inference Classification Override | Tool to update the classification of messages from a specific sender in a user's Focused Inbox. Use when you need to change whether messages from a sender go to Focused or Other inbox for a specific user. |
| `OUTLOOK_UPDATE_USER_MAIL_FOLDER_MESSAGE` | Update user mail folder message | Tool to update properties of a message in a specific mail folder for a user. Use when you need to modify message attributes like categories, read status, importance, or other properties for a message within a particular user's folder. |
| `OUTLOOK_UPDATE_USER_MAIL_FOLDER_MESSAGE_EXTENSION` | Update user message extension | Tool to update an open extension on a message within a specific user's mail folder. Use when you need to modify custom properties stored in a message extension for a specific user. |
| `OUTLOOK_UPDATE_USER_MAIL_FOLDER_MESSAGE_RULE` | Update user mail folder message rule | Tool to update a message rule in a user's mail folder. Use when you need to modify an existing rule's properties, conditions, actions, or exceptions for a specific user. |
| `OUTLOOK_UPDATE_USER_MAIL_FOLDERS_CHILD_FOLDERS` | Update user mail folder child folder | Tool to update a child folder within a mail folder for a specific user. Use when you need to rename a child mail folder. |
| `OUTLOOK_UPDATE_USER_MESSAGE_EXTENSION` | Update user message extension | Tool to update an open extension on a user's message. Use when you need to modify custom properties stored in a message extension for a specific user. |

## Supported Triggers

| Trigger slug | Name | Description |
|---|---|---|
| `OUTLOOK_CONTACT_TRIGGER` | New Contact Added | Triggered when a new contact is added in the Outlook contacts. |
| `OUTLOOK_EVENT_CHANGE_TRIGGER` | Calendar Event Changes | Triggered when a new calendar event occurs (created, updated, or deleted) in the Outlook calendar. |
| `OUTLOOK_EVENT_TRIGGER` | New Calendar Event | Triggered when a new calendar event is created in the Outlook calendar. |
| `OUTLOOK_MESSAGE_TRIGGER` | New Outlook Message | Triggered when a new message is received in the Outlook mailbox. |
| `OUTLOOK_SENT_MESSAGE_TRIGGER` | New Sent Message | Triggered when a new message is sent from the Outlook mailbox. |

## Creating MCP Server - Stand-alone vs Composio SDK

The Outlook MCP server is an implementation of the Model Context Protocol that connects your AI agent to Outlook. It provides structured and secure access so your agent can perform Outlook operations on your behalf through a secure, permission-based interface.
With Composio's managed implementation, you don't have to create your own developer app. For production, if you're building an end product, we recommend using your own credentials. The managed server helps you prototype fast and go from 0-1 faster.

## Step-by-step Guide

### 1. Prerequisites

Before you begin, make sure you have:
- Node.js and npm installed
- A Composio account with API key
- An OpenAI API key

### 1. Getting API Keys for OpenAI and Composio

OpenAI API Key
- Go to the [OpenAI dashboard](https://platform.openai.com/settings/organization/api-keys) and create an API key. You'll need credits to use the models, or you can connect to another model provider.
- Keep the API key safe.
Composio API Key
- Log in to the [Composio dashboard](https://dashboard.composio.dev?utm_source=toolkits&utm_medium=framework_docs).
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.

### 2. Install required dependencies

First, install the necessary packages for your project.
What you're installing:
- @ai-sdk/openai: Vercel AI SDK's OpenAI provider
- @ai-sdk/mcp: MCP client for Vercel AI SDK
- @composio/core: Composio SDK for tool integration
- ai: Core Vercel AI SDK
- dotenv: Environment variable management
```bash
npm install @ai-sdk/openai @ai-sdk/mcp @composio/core ai dotenv
```

### 3. Set up environment variables

Create a .env file in your project root.
What's needed:
- OPENAI_API_KEY: Your OpenAI API key for GPT model access
- COMPOSIO_API_KEY: Your Composio API key for tool access
- COMPOSIO_USER_ID: A unique identifier for the user session
```bash
OPENAI_API_KEY=your_openai_api_key_here
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_user_id_here
```

### 4. Import required modules and validate environment

What's happening:
- We're importing all necessary libraries including Vercel AI SDK's OpenAI provider and Composio
- The dotenv/config import automatically loads environment variables
- The MCP client import enables connection to Composio's tool server
```typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});
```

### 5. Create Tool Router session and initialize MCP client

What's happening:
- We're creating a Tool Router session that gives your agent access to Outlook tools
- The create method takes the user ID and specifies which toolkits should be available
- The returned mcp object contains the URL and authentication headers needed to connect to the MCP server
- This session provides access to all Outlook-related tools through the MCP protocol
```typescript
async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["outlook"],
  });

  const mcpUrl = session.mcp.url;
```

### 6. Connect to MCP server and retrieve tools

What's happening:
- We're creating an MCP client that connects to our Composio Tool Router session via HTTP
- The mcp.url provides the endpoint, and mcp.headers contains authentication credentials
- The type: "http" is important - Composio requires HTTP transport
- tools() retrieves all available Outlook tools that the agent can use
```typescript
const mcpClient = await createMCPClient({
  transport: {
    type: "http",
    url: mcpUrl,
    headers: session.mcp.headers, // Authentication headers for the Composio MCP server
  },
});

const tools = await mcpClient.tools();
```

### 7. Initialize conversation and CLI interface

What's happening:
- We initialize an empty messages array to maintain conversation history
- A readline interface is created to accept user input from the command line
- Instructions are displayed to guide the user on how to interact with the agent
```typescript
let messages: ModelMessage[] = [];

console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log(
  "Ask any questions related to outlook, like summarize my last 5 emails, send an email, etc... :)))\n",
);

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  prompt: "> ",
});

rl.prompt();
```

### 8. Handle user input and stream responses with real-time tool feedback

What's happening:
- We use streamText instead of generateText to stream responses in real-time
- toolChoice: "auto" allows the model to decide when to use Outlook tools
- stopWhen: stepCountIs(10) allows up to 10 steps for complex multi-tool operations
- onStepFinish callback displays which tools are being used in real-time
- We iterate through the text stream to create a typewriter effect as the agent responds
- The complete response is added to conversation history to maintain context
- Errors are caught and displayed with helpful retry suggestions
```typescript
rl.on("line", async (userInput: string) => {
  const trimmedInput = userInput.trim();

  if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
    console.log("\nGoodbye!");
    rl.close();
    process.exit(0);
  }

  if (!trimmedInput) {
    rl.prompt();
    return;
  }

  messages.push({ role: "user", content: trimmedInput });
  console.log("\nAgent is thinking...\n");

  try {
    const stream = streamText({
      model: openai("gpt-5"),
      messages,
      tools,
      toolChoice: "auto",
      stopWhen: stepCountIs(10),
      onStepFinish: (step) => {
        for (const toolCall of step.toolCalls) {
          console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
```

## Complete Code

```typescript
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";

const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;

if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");

const composio = new Composio({
  apiKey: composioAPIKey,
});

async function main() {
  // Create a tool router session for the user
  const session = await composio.create(composioUserID!, {
    toolkits: ["outlook"],
  });

  const mcpUrl = session.mcp.url;

  const mcpClient = await createMCPClient({
    transport: {
      type: "http",
      url: mcpUrl,
      headers: session.mcp.headers, // Authentication headers for the Composio MCP server
    },
  });

  const tools = await mcpClient.tools();

  let messages: ModelMessage[] = [];

  console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
  console.log(
    "Ask any questions related to outlook, like summarize my last 5 emails, send an email, etc... :)))\n",
  );

  const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    prompt: "> ",
  });

  rl.prompt();

  rl.on("line", async (userInput: string) => {
    const trimmedInput = userInput.trim();

    if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
      console.log("\nGoodbye!");
      rl.close();
      process.exit(0);
    }

    if (!trimmedInput) {
      rl.prompt();
      return;
    }

    messages.push({ role: "user", content: trimmedInput });
    console.log("\nAgent is thinking...\n");

    try {
      const stream = streamText({
        model: openai("gpt-5"),
        messages,
        tools,
        toolChoice: "auto",
        stopWhen: stepCountIs(10),
        onStepFinish: (step) => {
          for (const toolCall of step.toolCalls) {
            console.log(`[Using tool: ${toolCall.toolName}]`);
          }
          if (step.toolCalls.length > 0) {
            console.log(""); // Add space after tool calls
          }
        },
      });

      for await (const chunk of stream.textStream) {
        process.stdout.write(chunk);
      }

      console.log("\n\n---\n");

      // Get final result for message history
      const response = await stream.response;
      if (response?.messages?.length) {
        messages.push(...response.messages);
      }
    } catch (error) {
      console.error("\nAn error occurred while talking to the agent:");
      console.error(error);
      console.log(
        "\nYou can try again or restart the app if it keeps happening.\n",
      );
    } finally {
      rl.prompt();
    }
  });

  rl.on("close", async () => {
    await mcpClient.close();
    console.log("\n👋 Session ended.");
    process.exit(0);
  });
}

main().catch((err) => {
  console.error("Fatal error:", err);
  process.exit(1);
});
```

## Conclusion

You've successfully built a Outlook agent using the Vercel AI SDK with streaming capabilities! This implementation provides a powerful foundation for building AI applications with natural language interfaces and real-time feedback.
Key features of this implementation:
- Real-time streaming responses for a better user experience with typewriter effect
- Live tool execution feedback showing which tools are being used as the agent works
- Dynamic tool loading through Composio's Tool Router with secure authentication
- Multi-step tool execution with configurable step limits (up to 10 steps)
- Comprehensive error handling for robust agent execution
- Conversation history maintenance for context-aware responses
You can extend this further by adding custom error handling, implementing specific business logic, or integrating additional Composio toolkits to create multi-app workflows.

## How to build Outlook MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/outlook/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/outlook/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/outlook/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/outlook/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/outlook/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/outlook/framework/codex)
- [Cursor](https://composio.dev/toolkits/outlook/framework/cursor)
- [VS Code](https://composio.dev/toolkits/outlook/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/outlook/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/outlook/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/outlook/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/outlook/framework/cli)
- [Google ADK](https://composio.dev/toolkits/outlook/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/outlook/framework/langchain)
- [Mastra AI](https://composio.dev/toolkits/outlook/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/outlook/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/outlook/framework/crew-ai)

## Related Toolkits

- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Slack](https://composio.dev/toolkits/slack) - Slack is a channel-based messaging platform for teams and organizations. It helps people collaborate in real time, share files, and connect all their tools in one place.
- [Gong](https://composio.dev/toolkits/gong) - Gong is a platform for video meetings, call recording, and team collaboration. It helps teams capture conversations, analyze calls, and turn insights into action.
- [Microsoft teams](https://composio.dev/toolkits/microsoft_teams) - Microsoft Teams is a collaboration platform that combines chat, meetings, and file sharing within Microsoft 365. It keeps distributed teams connected and productive through seamless virtual communication.
- [Slackbot](https://composio.dev/toolkits/slackbot) - Slackbot is a conversational automation tool for Slack that handles reminders, notifications, and automated responses. It boosts team productivity by streamlining onboarding, answering FAQs, and managing timely alerts—all right inside Slack.
- [2chat](https://composio.dev/toolkits/_2chat) - 2chat is an API platform for WhatsApp and multichannel text messaging. It streamlines chat automation, group management, and real-time messaging for developers.
- [Agent mail](https://composio.dev/toolkits/agent_mail) - Agent mail provides AI agents with dedicated email inboxes for sending, receiving, and managing emails. It empowers agents to communicate autonomously with people, services, and other agents—no human intervention needed.
- [Basecamp](https://composio.dev/toolkits/basecamp) - Basecamp is a project management and team collaboration tool by 37signals. It helps teams organize tasks, share files, and communicate efficiently in one place.
- [Chatwork](https://composio.dev/toolkits/chatwork) - Chatwork is a team communication platform with group chats, file sharing, and task management. It helps businesses boost collaboration and streamline productivity.
- [Clickmeeting](https://composio.dev/toolkits/clickmeeting) - ClickMeeting is a cloud-based platform for running online meetings and webinars. It helps businesses and individuals host, manage, and engage virtual audiences with ease.
- [Confluence](https://composio.dev/toolkits/confluence) - Confluence is Atlassian's team collaboration and knowledge management platform. It helps your team organize, share, and update documents and project content in one secure workspace.
- [Dailybot](https://composio.dev/toolkits/dailybot) - DailyBot streamlines team collaboration with chat-based standups, reminders, and polls. It keeps work flowing smoothly in your favorite messaging platforms.
- [Dialmycalls](https://composio.dev/toolkits/dialmycalls) - Dialmycalls is a mass notification service for sending voice and text messages to contacts. It helps teams and organizations quickly broadcast urgent alerts and updates.
- [Dialpad](https://composio.dev/toolkits/dialpad) - Dialpad is a cloud-based business phone and contact center system for teams. It unifies voice, video, messaging, and meetings across your devices.
- [Discord](https://composio.dev/toolkits/discord) - Discord is a real-time messaging and VoIP platform for communities and teams. It lets users chat, share media, and collaborate across public and private channels.
- [Discordbot](https://composio.dev/toolkits/discordbot) - Discordbot is an automation tool for Discord servers that handles moderation, messaging, and user engagement. It helps communities run smoothly by automating routine and complex tasks.
- [Echtpost](https://composio.dev/toolkits/echtpost) - Echtpost is a secure digital communication platform for encrypted document and message exchange. It ensures confidential data stays private and protected during transmission.
- [Egnyte](https://composio.dev/toolkits/egnyte) - Egnyte is a cloud-based platform for secure file sharing, storage, and governance. It helps teams collaborate efficiently while maintaining data compliance and security.
- [Google Meet](https://composio.dev/toolkits/googlemeet) - Google Meet is a secure video conferencing platform for virtual meetings, chat, and screen sharing. It helps teams connect, collaborate, and communicate seamlessly from anywhere.
- [Heartbeat](https://composio.dev/toolkits/heartbeat) - Heartbeat is a plug-and-play platform for building and managing online communities. It helps you organize users, channels, events, and discussions in one place.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Outlook MCP?

With a standalone Outlook MCP server, the agents and LLMs can only access a fixed set of Outlook tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Outlook and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Vercel AI SDK v6?

Yes, you can. Vercel AI SDK v6 fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Outlook tools.

### Can I manage the permissions and scopes for Outlook while using Tool Router?

Yes, absolutely. You can configure which Outlook scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Outlook data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
