Problem
Complex tool parameters rendered with the Inspector JSON editor publish invalid intermediate JSON to the parent form as a string. The controlled field then serializes that string on the next render, escaping quotes and replacing the text the user is actively typing.
This affects any free-form array or object parameter that uses the JSON fallback editor.
Example tool signature
{
"name": "batch_process_items",
"inputSchema": {
"type": "object",
"properties": {
"itemIds": {
"type": "array",
"items": { "type": "string" },
"description": "IDs to process"
}
},
"required": ["itemIds"]
}
}
Reproduction
- Connect the Inspector to a server exposing the tool above.
- Open the Tools tab and select
batch_process_items.
- Type
["item-1","item-2"] into itemIds character by character.
- Before the JSON is complete, observe the editor replacing the draft with a quoted/escaped JSON string and moving the caret.
Expected behavior
The editor should preserve raw draft text while JSON is incomplete, publish only successfully parsed JSON values to the tool form state, and prevent a stale previously-valid value from being submitted during an invalid replacement edit.
Problem
Complex tool parameters rendered with the Inspector JSON editor publish invalid intermediate JSON to the parent form as a string. The controlled field then serializes that string on the next render, escaping quotes and replacing the text the user is actively typing.
This affects any free-form array or object parameter that uses the JSON fallback editor.
Example tool signature
{ "name": "batch_process_items", "inputSchema": { "type": "object", "properties": { "itemIds": { "type": "array", "items": { "type": "string" }, "description": "IDs to process" } }, "required": ["itemIds"] } }Reproduction
batch_process_items.["item-1","item-2"]intoitemIdscharacter by character.Expected behavior
The editor should preserve raw draft text while JSON is incomplete, publish only successfully parsed JSON values to the tool form state, and prevent a stale previously-valid value from being submitted during an invalid replacement edit.