Need OpenSearch MCP example

Hi all,

I am using OS 3.3.1 and I am trying to create an MCP tool that runs the following query against a specific index.

Query:

GET my_pdf_docs/_search
{
“query”: {
“query_string”: {
“default_field”: “*”,
“query”: “{llm_query_here}”
}
}
}

Can you please provide me with an example that registers such tool. I tried

To be more specific, I am trying to build an OpenSearch tool that performs RAG using neural search or DSL (with search template). The RAG should internally do reranking before returning the results. The tool is expected to be called by external framework such as langchain. The tool must not require an LLM.

I could not find any OpenSearch out-of-the-box tool that does reranking nor execute search template without requiring an LLM.

The QueryPlanningTool is good but it requires an LLM! The text generation step needs to be outside of OpenSearch.