feat: Add search capability to the ListPane component to allow users to filter resources, prompts and tools #727
+310
−33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability for the user to search their different types of resources they might get back from their MCP server. For example they may want to search on a particular tool name or description and this PR allows them to do that.
Motivation and Context
After using the tool I was finding myself wanting to search for particular tools and I wasn't able to do that. When the MCP server exposes a number of tools it isn't able to render them all on screen so it required me to scroll through them to find the one I was looking for.
This was mainly because I wanted to quickly navigate the tools but as the ListPane tile is used for the other types as well I figured it would be a good place to add the search so it can be used for those types as well.
How Has This Been Tested?
I have tested this by spinning up a dummy MCP server using fastMCP and connecting my MCP inspector to it. This all worked fine and I was able to filter down the results I got back based on my search string. I've attached a screen recording so that you can see this in action. As well as the manual testing I added some UT to cover the new functionality, this component did not have it's own test suite so I've added that with some basic rendering tests as well.
inspector-search-sr.mov
Breaking Changes
Types of changes
Checklist
Additional context
This could be extended to add additional filtering options and/or the ability to control the ordering that the results get displayed. I'm not sure how much additional value that would add so I've not added it as part of this PR but happy to re-visit if people think it's worth doing.