Add RequestContext and logging (#176)

* Implemented MCP logging specification with auto-injection

* Add RequestContext

* fix tests and style

* Better deprecation

* fix: minor

* Remove ClientAwareInterface

* fix cs

* fix docs

---------

Co-authored-by: Adam Jamiu <jamiuadam120@gmail.com>
This commit is contained in:
Tobias Nyholm 2025-12-16 00:12:02 +01:00 • committed by GitHub
commit a1e0f61b6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,7 +39,7 @@ final class SetLogLevelRequest extends Request
protected static function fromParams(?array $params): static
{
if (!isset($params['level']) || !\is_string($params['level']) || empty($params['level'])) {
if (!isset($params['level']) || !\is_string($params['level']) || '' === $params['level']) {
throw new InvalidArgumentException('Missing or invalid "level" parameter for "logging/setLevel".');
}