Add changelog for 0.2.0 (#187)

This commit is contained in:
Tobias Nyholm 2025-12-20 08:50:08 +01:00 • committed by GitHub
commit 3b31954ac6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View file

@ -7,6 +7,12 @@ All notable changes to `mcp/sdk` will be documented in this file.
* Make `Protocol` stateless by decouple if from `TransportInterface`. Removed `Protocol::getTransport()`.
* Change signature of `Builder::addLoaders(...$loaders)` to `Builder::addLoaders(iterable $loaders)`.
* Removed `ClientAwareInterface` in favor of injecting a `RequestContext` with argument injection.
* The `ClientGateway` cannot be injected with argument injection anymore. Use `RequestContext` instead.
* Removed `ClientAwareTrait`
* Removed `Protocol::getTransport()`
* Added parameter for `TransportInterface` to `Protocol::processInput()`
0.1.0
-----

View file

@ -12,7 +12,6 @@
namespace Mcp\Capability\Discovery;
use Mcp\Capability\Attribute\Schema;
use Mcp\Server\ClientGateway;
use Mcp\Server\RequestContext;
use phpDocumentor\Reflection\DocBlock\Tags\Param;
@ -416,7 +415,7 @@ class SchemaGenerator
if ($reflectionType instanceof \ReflectionNamedType && !$reflectionType->isBuiltin()) {
$typeName = $reflectionType->getName();
if (is_a($typeName, ClientGateway::class, true) || is_a($typeName, RequestContext::class, true)) {
if (is_a($typeName, RequestContext::class, true)) {
continue;
}
}

View file

@ -43,7 +43,8 @@ use Mcp\Server\Session\SessionInterface;
*
* Example usage in a tool:
* ```php
* public function analyze(string $text, ClientGateway $client): string {
* public function analyze(string $text, RequestContext $context): string {
* $client = $context->getClientGateway();
* // Send progress notification
* $client->notify(new ProgressNotification("Starting analysis..."));
*