Skip to content

v0.5.0

Latest

Choose a tag to compare

@paulbalandan paulbalandan released this 26 Jul 19:53
v0.5.0
c4bc793

What's Changed

Important

This is the last version supporting the 2025-11-25 spec version. All subsequent versions are now geared towards the upcoming new version: 2026-07-28.

Added

  • An online API reference for the public Nexus\Mcp\ API, generated from the source with ApiGen and published to GitHub Pages on every push to 1.x.

Fixed

  • The #[InputSchema] attribute's definition parameter no longer claims to be a full schema override in its PHPDoc. Only the type, $schema, properties, and required keys of a supplied definition reach the advertised tool inputSchema, which the annotation now documents.
  • A discovered tool that returns an array the adapter cannot map (a non-empty list whose items are not all content blocks, or an integer-keyed array that is not valid structured content) now throws UnsupportedReturnValueException naming the handler method, instead of a bare ExpectationFailedException, matching every other unsupported-return path.
  • A JSON-RPC error response whose error.data is a non-object JSON value (string, number, list, or boolean) no longer fails to decode. The spec types Error.data as unknown, so Error::$data and the response parser now accept any JSON value instead of rejecting a non-object. Previously the client discarded such a response without rejecting the correlated request, leaving the caller's await() unresolved.
  • A peer-supplied jsonrpc version value carrying control characters is now escaped (non-printable bytes rendered as \xNN) in the version-mismatch error message instead of being emitted raw, consistent with how the method-name fields are already rendered. This stops a peer from forging newlines in plain-text sinks that record the rejection.
  • A failed transport send during Client::sendRequest() or Client::initialize() no longer leaves the correlated request registered. Previously, if send() threw after the request was registered (for example, writing to an already-closed transport), the pending-request entry was never freed, slowly growing the correlation map. The client now releases the registration before propagating the send failure.

Full Changelog: https://github.com/NexusPHP/mcp-sdk/compare/v0.4.0...v0.5.0