references/protocol.md — Mail and Files Connector

From version 0.1.0 of Mail and Files Connector, shown publicly by its creator. 2.1 KiB · SHA-256 20787a971fe318c9e5c59863f4bb3bfe5678374d63543685ae6370300fd26028.

# Protocol and result bounds

Each JSON-RPC 2.0 message occupies one line. The current 2026-07-28 style carries `_meta` keys `io.modelcontextprotocol/protocolVersion` and `io.modelcontextprotocol/clientCapabilities` in every request. `server/discover` reports `supportedVersions`, capabilities, and server information in `_meta`; its complete result and `tools/list` include `resultType: complete`, `ttlMs: 0`, and `cacheScope: private`. Modern `tools/call` results have `resultType: complete` and no caching hints. Legacy 2025-11-25 and 2025-06-18 clients can use `initialize` and `notifications/initialized`. Unsupported versions receive error -32022 with every supported version and the requested version in `data`.

List tools return at most 50 items and identify skipped additional pages. Oversized metadata is truncated and Graph download URLs are omitted, with an incomplete marker. An incomplete tool result includes `incomplete` and `skipped` and sets `isError: true`; starting the server with `--allow-partial` sets `isError: false` for those results. Partial results never change the process exit status. `mail_read` returns at most 10,000 body characters. Graph JSON is returned as JSON in tool content and structured content; callers must treat it as untrusted data. Version 0.1.0 has no write tools. No delivery or write-verification feature is present.

The server reads the complete Graph JSON response (at most 2,000,000 bytes) before applying item and body output limits; a 50-item or body limit does not restrict upstream reads. No additional pages are fetched. Stdin is read as bytes, with a 1,000,000-byte line limit including its newline; larger lines receive a clear error and are drained in bounded byte chunks. Strict UTF-8 decoding occurs per request: undecodable lines receive JSON-RPC -32700 and serving continues. JSON output escapes non-ASCII characters so stdout works in UTF-8 and C locales. Test fixtures are read once with a 2,000,000-byte limit; malformed JSON, fixture entries, collection items, pagination metadata and message bodies are rejected explicitly.

By Zero Width Lab (zerowidthlab.com)

License: MIT (read it).

MITMIT License

Copyright (c) 2026 Zero Width Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Back to the listing