You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the previous Semantic Navigation tools section with a new DSL Search section that documents Elasticsearch-compatible Query DSL tools (6 tools). Update the top-level description to mention DSL-based search, remove the hardcoded "27 tools" phrasing, and add usage guidance, query examples, and a how-the-LLM-uses flow for dsl_list_indices, dsl_get_mappings, dsl_search, dsl_get_document and dsl_suggest. Add links to the new DSL Query API and DSL Compatibility Matrix docs, adjust related link text to reference DSL tools, and make minor wording tweaks around native/external tools and MCP servers.
Copy file name to clipboardExpand all lines: docs-turing/tool-calling.md
+76-32Lines changed: 76 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,91 @@
1
1
---
2
2
sidebar_position: 5
3
3
title: Tool Calling
4
-
description: Native tool calling capabilities available to AI Agents in Turing ES β 27 tools across 7 categories.
4
+
description: Native tool calling capabilities available to AI Agents in Turing ES β DSL-based search tools, RAG, web crawling, and more.
5
5
---
6
6
7
7
# Tool Calling
8
8
9
9
A **Tool Calling** is a function that the LLM can invoke autonomously during a conversation to retrieve information or perform an action. Instead of relying purely on training data, the LLM calls tools to fetch live data, search indexed content, execute code, and more β then incorporates the results into its reasoning.
10
10
11
-
Turing ES includes **27 native tools** organized into 7 categories, plus support for external tools via [MCP Servers](./mcp-servers.md). Tools are enabled per [AI Agent](./ai-agents.md) β each agent selects only the tools it needs.
11
+
Turing ES includes native tools organized into categories, plus support for external tools via [MCP Servers](./mcp-servers.md). Tools are enabled per [AI Agent](./ai-agents.md) β each agent selects only the tools it needs.
12
12
13
13
---
14
14
15
-
## Semantic Navigation β 15 tools
15
+
## DSL Search β 6 tools
16
16
17
-
These tools allow the LLM to interact with any Semantic Navigation Site as a structured knowledge source, enabling rich search-based reasoning over your indexed content.
17
+
These tools provide **Elasticsearch-compatible Query DSL** access to any Semantic Navigation Site. Inspired by the [Elasticsearch MCP Server](https://github.com/elastic/mcp-server-elasticsearch), they allow the LLM to build and execute full DSL queries, aggregations, and analytics β automatically translated to the site's configured search engine (Elasticsearch, Solr, or Lucene).
18
18
19
19
| Tool | Description |
20
20
|---|---|
21
-
|`list_sites`| Lists all available SN Sites with their locales |
22
-
|`get_site_fields`| Returns valid facet fields for filtering a specific site |
23
-
|`get_valid_filter_values`| Returns valid values for a specific filter or facet |
24
-
|`search_site`| Searches a site and returns compact results (ID, title, URL, snippet) |
25
-
|`get_document_details`| Retrieves full text and metadata of a document by ID |
26
-
|`get_search_suggestions`| Autocomplete and spelling corrections for a search query |
27
-
|`find_similar_documents`| Finds semantically similar documents (More Like This) |
28
-
|`get_aggregated_stats`| Calculates totals and distributions by category via facet aggregation |
29
-
|`get_document_highlights`| Extracts snippets from a document where search terms appear |
30
-
|`compare_items`| Compares specific fields of two or more documents side by side |
31
-
|`search_recent_updates`| Retrieves the most recently updated content on a topic |
32
-
|`get_facet_summary`| Statistical summary of all available categories and attributes |
33
-
|`search_by_date_range`| Searches documents within a date range |
34
-
|`lookup_facet_value`| Searches a term across all facets to find exact values |
35
-
|`discover_facet_values`| Splits a phrase into words and searches across all facets |
36
-
37
-
**Prompt examples:**
38
-
39
-
-*"Search for documents about authentication in the Sample site"* β triggers `search_site`
40
-
-*"What fields can I filter by on the Sample site?"* β triggers `get_site_fields`, then `get_valid_filter_values`
41
-
-*"Show me the full content of document ID abc-123"* β triggers `get_document_details`
42
-
-*"Find documents similar to the article about Solr configuration"* β triggers `find_similar_documents`
43
-
-*"How many documents do we have per content type?"* β triggers `get_aggregated_stats` or `get_facet_summary`
44
-
-*"What articles were updated in the last 7 days about security?"* β triggers `search_recent_updates` or `search_by_date_range`
45
-
-*"Compare the features of Product A and Product B"* β triggers `search_site` then `compare_items`
21
+
|`dsl_list_indices`| Lists all available SN Sites with engine type, locales, and status |
22
+
|`dsl_get_mappings`| Returns field mappings (types, facets, multi-valued) in Elasticsearch format |
23
+
|`dsl_search`| Executes a full Elasticsearch Query DSL search (40 query types, 35 aggregations) |
24
+
|`dsl_get_document`| Retrieves a document by ID with all stored fields |
25
+
|`dsl_suggest`| Autocomplete suggestions and spell-check corrections |
The LLM follows a pattern similar to how a developer uses the Elasticsearch API:
31
+
32
+
1.**Discover** β `dsl_list_indices("*")` to find available sites
33
+
2.**Understand schema** β `dsl_get_mappings("mySite")` to see fields and types
34
+
3.**Search** β `dsl_search("mySite", "en", queryBody)` with full DSL
35
+
4.**Deep dive** β `dsl_get_document("mySite", "en", "doc-123")` for full content
36
+
5.**Correct typos** β `dsl_suggest("mySite", "en", "enterprse")` for corrections
37
+
38
+
### The `dsl_search` tool
39
+
40
+
This is the most powerful tool. The `queryBody` parameter accepts the complete Elasticsearch `_search` request body as a JSON string. The LLM constructs the query based on the user's intent:
For the complete DSL reference, see [DSL Query API](./dsl-query.md) and [DSL Compatibility Matrix](./dsl-compatibility.md).
77
+
78
+
### Prompt examples
79
+
80
+
-*"Search for documents about authentication in the Sample site"* β `dsl_search` with `match` query
81
+
-*"What fields can I filter by on the Sample site?"* β `dsl_get_mappings`
82
+
-*"Show me the full content of document ID abc-123"* β `dsl_get_document`
83
+
-*"How many documents do we have per content type?"* β `dsl_search` with `terms` aggregation
84
+
-*"Find documents similar to the article about Solr configuration"* β `dsl_search` with `more_like_this`
85
+
-*"What articles were updated in the last 7 days about security?"* β `dsl_search` with `range` + `sort`
86
+
-*"Compare the features of Product A and Product B"* β `dsl_get_document` called for each product
87
+
-*"What categories are available?"* β `dsl_search` with `size:0` and `terms` aggregation
88
+
-*"How many documents per locale does the site have?"* β `dsl_get_shards`
46
89
47
90
---
48
91
@@ -152,7 +195,7 @@ The Python executable path is configured in **Administration β Settings β Py
152
195
153
196
## External Tools via MCP Servers
154
197
155
-
Beyond the 27 native tools, AI Agents can access tools from any external server implementing the **Model Context Protocol (MCP)**. This covers company-internal systems, proprietary data APIs, and the growing ecosystem of public MCP servers.
198
+
Beyond the native tools, AI Agents can access tools from any external server implementing the **Model Context Protocol (MCP)**. This covers company-internal systems, proprietary data APIs, and the growing ecosystem of public MCP servers.
156
199
157
200
See [MCP Servers](./mcp-servers.md) for configuration details.
158
201
@@ -164,8 +207,9 @@ See [MCP Servers](./mcp-servers.md) for configuration details.
164
207
|---|---|
165
208
|[AI Agents](./ai-agents.md)| How to compose agents with the tools they need |
166
209
|[MCP Servers](./mcp-servers.md)| Extend agents with external tools via MCP |
210
+
|[DSL Query API](./dsl-query.md)| Full reference for the Elasticsearch-compatible DSL |
211
+
|[DSL Compatibility Matrix](./dsl-compatibility.md)| Engine compatibility for all DSL features |
167
212
|[Assets](./assets.md)| Knowledge Base files queried by RAG tools |
168
-
|[Semantic Navigation](./semantic-navigation.md)| The search experience powering SN tools |
213
+
|[Semantic Navigation](./semantic-navigation.md)| The search experience powering DSL tools |
0 commit comments