-
Notifications
You must be signed in to change notification settings - Fork 30
feat: add search tool for profile and explain #28
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
base: main
Are you sure you want to change the base?
Conversation
I noticed that this PR includes code from PR #25 . The authentication validation issue will be resolved once PR #25 is merged into main. I apologize for not creating a separate branch from the beginning, which led to this dependency. I will be more careful with branch management in future contributions. Next time, I will make sure to work on separate branches for future contributions. Thank you for your understanding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your interest in ES mcp server! I left some questions.
Also, please try to only include changes that relate to the issue/PR.
index.ts
Outdated
body: { | ||
...queryBody, | ||
profile: true, | ||
explain: explain, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that profile/explain is part of search API, isn't it sort of supported by search
tool?
Would it make sense to just add new param to search tool e.g. explain: bool
that would:
- set profile and explain to true
- process the response and include profile info in text fragmetns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you're right. I was missing it.
Previously, we had a separate profile_query tool for query profiling, but I've now integrated these features into the search tool. This change adds profile and explain parameters to the existing search functionality, allowing users to get profiling data and query explanations in a single request. The integration includes performance analysis and optimization suggestions
@jedrazb please bump version to 0.1.2 |
This change adds profile and explain parameters to the existing search functionality, allowing users to get profiling data and query explanations in a single request.
Changes
search
tool parameters:profile: boolean
- Enable query profilingexplain: boolean
- Enable query explanationprofile_query
tool