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
schema.json: JSONValue rejects non-integer numbers and null that schema.ts allows (affects Remote.extensionsInfo) #57
Since #55, Remote.extensionsInfo values are JSONObject, so an entry holding a fractional number or a null is valid by schema.ts and invalid by schema.json.
Repro: ajv 8.20 (Ajv2020), schema.json at 28db12c, validating #/$defs/ServerCard, with remotes[0].extensionsInfo set to:
Value
Result
{"io.example/limits": {"rate": 3}}
valid
{"io.example/limits": {"rate": 0.5}}
invalid
{"io.example/keys": {"rotatesAt": null}}
invalid
Context: the README makes schema.ts the source of truth and schema.json generated from it. scripts/generate-schema.ts runs typescript-json-schema --defaultNumberType integer. The core spec met the null half of this for Task.ttl (modelcontextprotocol/modelcontextprotocol#2313, fixed in #2408 with @nullable). The core spec's schema/draft/schema.json has the same JSONValue shape.
Question: is the narrower schema.json intended for extensionsInfo values, or should JSONValue keep number and null? Validators that use schema.json (mcp-server-card-check among them, which notes the difference in its README) reject these cards today. Glad to open a PR either way.
Activity