Repository navigation
BREAKING: MCP trust, result and error handling now match the PHP reference
Breaking changes
- A tool result whose
isErrorfield is present and not literallyFalse(includingNone) reports a guarded
tool failure. Only an absent field orFalsereports success. - An explicitly empty trust allow-list is refused before the server is contacted, with a message distinct from
missing trust. Trusting every tool on a server that offers none is still valid. - Non-text content parts are replaced by ordered omission markers instead of being dropped silently. Text is
forwarded only from parts labelledtype: "text". - A tool you named explicitly whose mirrored-parameter annotations are invalid now raises. Tools excluded under
wildcard trust stay inspectable throughexcluded().
Changes
- Trusted tools the server does not offer are reported through the optional sync or async
on_diagnostic
callback, or a nativeMcpDiagnosticWarningby default. Diagnostics carry only the tool names you configured. A
failing callback stops discovery and no tools are offered. - The default result limit rises from 65,536 to 262,144 UTF-8 bytes, matching PHP. Explicit and disabled limits keep
their meaning. - No HTTP transport, cache or mirrored-header encoding change.