-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: Restore JSONForm array when all items are simple items #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Restore JSONForm array when all items are simple items #434
Conversation
|
Hi @max-stytch I tried testing with a schema based on the shape you linked to but when I click the Add Item button, it doesn't show a field like it does in your screenshot. Have I got the schema wrong?
test-form.mov |
|
Hi @max-stytch we merged a larger set of changes here which I think will have addressed both this and the required issue that you pointed out: #480 |
|
Amazing!
…On Fri, Jun 27, 2025 at 9:09 PM Ola Hungerford ***@***.***> wrote:
*olaservo* left a comment (modelcontextprotocol/inspector#434)
<#434 (comment)>
Hi @max-stytch <https://github.com/max-stytch> we merged a larger set of
changes here which I think will have addressed both this and the required
issue that you pointed out: #480
<#480>
—
Reply to this email directly, view it on GitHub
<#434 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVOFOTYI3PQRH5FISY2MZO33FYIRDAVCNFSM6AAAAAB526K32CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMJUHEZDMNZXG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@max-stytch I think there were some crossed wires here. @olaservo's comment that led you to close this I think was mistaken. This was about the form handling and #480 was about fixing a problem where we had the required field as a boolean rather than an array. I think we still need this. We also need a tool in the everything server that has a complex inputSchema to test with. |
|
I was doing unrelated There is a slight quirk, that objects with typed properties do not initialize default values the same as primitive fields. Skimming the code, I think this is because in the Here's the tool schema, and a screenshot of the form. (I added alternating bounding boxes in the screenshot just to make the form layout clearer. I think the layout can be improved.) I can add such a tool to the Everything Server. {
"tools": [
{
"name": "complex_input_schema_tool",
"description": "Tool that handles complex input schemas with mixed-type arrays.",
"inputSchema": {
"type": "object",
"properties": {
"numbers": {
"description": "An array of numbers",
"items": {
"type": "number"
},
"title": "Numbers",
"type": "array"
},
"strings": {
"description": "An array of strings",
"items": {
"type": "string"
},
"title": "Strings",
"type": "array"
},
"objects": {
"description": "An array of objects (dicts)",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Objects",
"type": "array"
},
"typed_objects": {
"description": "An array of objects with 'word' (str) and 'length' (int) properties",
"items": {
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "object"
},
"title": "Typed Objects",
"type": "array"
},
"structured_objects": {
"description": "An array of structured objects with defined word and length properties",
"items": {
"properties": {
"word": {
"title": "Word",
"type": "string"
},
"length": {
"title": "Length",
"type": "integer"
}
},
"required": [
"word",
"length"
],
"title": "WordItem",
"type": "object"
},
"title": "Structured Objects",
"type": "array"
},
"mixed": {
"description": "An array of non-uniform types (int, str, bool, dict, etc.)",
"items": {},
"title": "Mixed",
"type": "array"
},
"str_and_int": {
"description": "An array containing only strings and integers",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Str And Int",
"type": "array"
}
},
"required": [
"numbers",
"strings",
"objects",
"typed_objects",
"structured_objects",
"mixed",
"str_and_int"
]
},
"outputSchema": {
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
},
"_meta": {
"_fastmcp": {
"tags": []
}
}
}
]
}
|
@richardkmichael Fixed in the existing Inspector or with this PR?
This would be nice. |
On
Will do. |


Motivation and Context
Partially resolves of #332 - this PR restores the array logic that was removed in #284, but only when all nested objects are also "simple" objects.
How Has This Been Tested?
Validated against the JSON schema in this comment - nested items are rendered appropriately

Breaking Changes
Types of changes
Checklist
Additional context