Tool selection fails with error
Inspector Version
0.17.2
Describe the bug After listing the tools and selecting one of the implemented tools in the UI, the web-app turns black with following error: index-Bl2jgoAl.js:3970 TypeError: Cannot use 'in' operator to search for 'default' in string
To Reproduce Steps to reproduce the behavior:
- Connect to MCP server
- Click on tools
- Select one of the tools
- Screen turns black and DevTools show error
Expected behavior It should show an input field to receive a text input
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: Mac OS
- Browser: Chrome
Additional context Add any other context about the problem here.
Hi @ducile I wasn't able to repro with the demo server @modelcontextprotocol/server-everything@latest, could you share which server you're testing with when this happens? I'm wondering if your tool's input schema is malformed.
Hi @olaservo , I'm using the latest @modelcontextprotocol/inspector and have connected it with my local MCP server. The project was setup using Kotlin Multiplatform. My tool input is configured as follows:
server.addTool( name = "send-confluent-platform-version-upgrade-information", description = """ Sends information about version upgrades. """.trimIndent(), inputSchema = Tool.Input( properties = JsonObject( mapOf( "changeNumber" to JsonPrimitive("string"), "currentVersion" to JsonPrimitive("string"), "newVersion" to JsonPrimitive("string"), "upgradePlan" to JsonPrimitive("string"), "linkToReleaseNotes" to JsonPrimitive("string") ) ), required = listOf("changeNumber", "currentVersion", "newVersion", "upgradePlan", "linkToReleaseNotes") )
I had the same issue and solved it, here is a sample server
You need to make sure to adhere to the latest specification, the property name is now a key, and the description and type are nested within it