Microsoft 365

Search Outlook mail

m365_mail_search · Reads only · Markdown

The newest messages in a mailbox folder, or those matching a search.

Free*

*Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads.

An example

What came into support@ that nobody has read yet?

Your agent callsm365_mail_searchFree*

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "mailbox": "support@hansenvoss.example",
  "unread_only": true
}
What comes back
{
  "mailbox": "support@hansenvoss.example",
  "messages": [
    {
      "id": "AAMkAGI2THVSAAA=",
      "subject": "Where is our combi steamer?",
      "from": "lukas.meyer@hotel-elbblick.example",
      "from_name": "Lukas Meyer",
      "to": [
        "support@hansenvoss.example"
      ],
      "received_at": "2026-10-14T07:41:09Z",
      "preview": "Hi, we ordered a combi steamer three weeks ago. When does it ship?",
      "read": false,
      "attachments": true,
      "thread_id": "AAQkAGI2Tv1"
    }
  ]
}

Use it when

The agent starts its round of the mailbox, or looks for a customer's earlier email.

What it does

The newest messages in a mailbox folder (inbox by default), or those matching a search: sender, subject, a preview and whether they are read. Free.

What comes back

mailbox; messages: each with id, subject, from, to, received_at, preview, read, attachments and thread_id. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
mailboxstringOne of the mailboxes the agent may act as; optional when only one is connected. Up to 254 characters.
querystringUp to 200 characters.
folderstringOne of: inbox,sentitems,drafts,archive,deleteditems,junkemail. Default: inbox.
unread_onlybooleanDefault: false.
limitinteger1 to 50. Default: 20.

The call

Over MCP, call m365_mail_search on https://api.conecto.chat/mcp/microsoft365. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/m365_mail_search \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mailbox":"support@hansenvoss.example","unread_only":true}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_connected409Microsoft 365 isn't connected yet.Connect it with m365_connect.
not_allowed403The mailbox is not one the agent may act as.Use a connected mailbox; the owner adds one by connecting again.
vendor_rejected502Microsoft refused: the app lacks a permission or consent, or the request.Ask the admin to grant what the message names.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md