You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A nullable tool parameter with a default ignores an explicit null argument #640
ReferenceHandler::prepareArguments() tests isset($arguments[$paramName]), so an argument the client explicitly sends as null is treated as missing: a parameter like ?string $category = 'books' receives 'books', not null. The schema allows null, the client sent null, the handler runs with another value.
Use array_key_exists($paramName, $arguments) in src/Capability/Registry/ReferenceHandler.php (line 145 at 5d311d6); castArgumentType() already returns null for a nullable type.
Versions: mcp/sdk main (5d311d6) and v0.9.0, PHP 8.3.
Activity