-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureSchemaIssues & PRs related to the Schema componentIssues & PRs related to the Schema componentbugSomething isn't workingSomething isn't working
Milestone
Description
The Schema attribute's enum property is typed as ?array<int, float|string|int>, which does not allow null values in the array.
The following syntax is correct and is the way to allow a nullable enum value :
#[Schema(description: 'Sort by property', enum: [null, "foo", "bar"])]
?string $sort = null,Current type hint (src/Capability/Attribute/Schema.php line 67-69):
/** @var ?array<int, float|string|int> */
public ?array $enum = null;Suggested fix:
/** @var ?array<int, float|string|int|null> */
public ?array $enum = null;Version: mcp/sdk v0.4.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureSchemaIssues & PRs related to the Schema componentIssues & PRs related to the Schema componentbugSomething isn't workingSomething isn't working