Microsoft 365

Search OneDrive files

m365_files_search · Reads only · Markdown

Files in a mailbox user's OneDrive whose name or words match.

Free*

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

An example

Find our returns policy.

Your agent callsm365_files_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",
  "query": "returns policy"
}
What comes back
{
  "mailbox": "support@hansenvoss.example",
  "files": [
    {
      "id": "01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K",
      "name": "Returns policy.txt",
      "size": 182,
      "folder": false,
      "type": "text/plain",
      "modified_at": "2026-09-02T10:12:00Z",
      "link": "https://hansenvoss-my.sharepoint.com/personal/support/Documents/Returns%20policy.txt"
    }
  ]
}

Use it when

The agent needs a document the team keeps in OneDrive.

What it does

Files in a mailbox user's OneDrive whose name or words match: name, size, kind, when changed and its link. Free.

What comes back

mailbox; files: each with id, name, size, folder, type, modified_at and link. 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.
queryRequiredstring1 to 200 characters.
limitinteger1 to 50. Default: 20.

The call

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

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

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