rust(feat): Improve search behavior in list tools - #710
Open
lineville wants to merge 2 commits into
Open
Conversation
Signed-off-by: Liam Neville <liam@siftstack.com>
lineville
marked this pull request as ready for review
July 31, 2026 23:02
evan-sift
reviewed
Aug 1, 2026
| means the pattern was too narrow, so retry a shorter fragment before you | ||
| tell the user that nothing exists. Each tool's description lists its own | ||
| filterable fields. When a request is too vague to filter on, sample with a | ||
| small `limit` and ask the user to narrow it rather than guessing. |
Collaborator
There was a problem hiding this comment.
Suggested change
| small `limit` and ask the user to narrow it rather than guessing. | |
| small `limit` (e.g. 5) and ask the user to narrow it rather than guessing. |
evan-sift
reviewed
Aug 1, 2026
Comment on lines
+509
to
+510
| Prefer a pattern over `==`: `name.matches(\"(?i)rover\")` is RE2, case-insensitive. | ||
| `contains`/`startsWith`/`endsWith` are case-SENSITIVE. Empty result: retry a shorter fragment. |
Collaborator
There was a problem hiding this comment.
open discussion, but perhaps we should start with what we do want. This phrasing is a bit passive (and most models should be smart enough), but wondering if we want something like this: (I workedshopped this locally for a bit)
When filtering or searching, use `name.matches("(?i)rover")`, not `==`. Use
`==` only for an exact value from a prior result.
`contains`/`startsWith`/`endsWith` are case-SENSITIVE: `contains("Rover")`
silently misses `rover-01`. An empty result is not proof of absence — retry
once with a shorter fragment.
Collaborator
There was a problem hiding this comment.
we'll then want to update all the instances in the tools with whatever we land on
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Improves the behavior of the MCP's searching capabilities by providing clearer guidance on how to use CEL match expressions to pull less data and be better and finding what the prompter is looking for.