-
Notifications
You must be signed in to change notification settings - Fork 197
[Agent Builder] MCP tool and bulk import documentation #4668
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
4fea52b
drafty progress
mattnowzari 172484f
Merge branch 'main' into mcp_docs
mattnowzari 989066f
Updated toc.yml
mattnowzari 962fa13
Incorporated suggestions
mattnowzari 381175c
Merge branch 'main' into mcp_docs
mattnowzari e54085a
Cleanup
mattnowzari 7192c65
Addressing some text feedback in mcp-tool.md
mattnowzari af7220b
Adding some images, still drafty though
mattnowzari 736ade8
attempt to fix image paths
mattnowzari ec5fb8e
maybe it works now?
mattnowzari b4c61a5
Adjust/experimenting with image sizes
mattnowzari bf2aaee
Update explore-analyze/ai-features/agent-builder/tools/mcp-tools.md
mattnowzari 173f181
Experiment with adding tool failure mode icons
mattnowzari 7a0a4e8
Attempt to fix image rendering for tool health
mattnowzari 6b6ff42
Experiment with tool icons being sub-images of bullet points
mattnowzari e646574
Experiment with tool icons being smaller
mattnowzari 44958f9
Merge branch 'main' into mcp_docs
mattnowzari 2acbe31
Move headings and images around
mattnowzari e99b0e1
Remove errant word
mattnowzari c0b1c59
Update explore-analyze/ai-features/agent-builder/tools/mcp-tools.md
mattnowzari 68f75e0
Update explore-analyze/ai-features/agent-builder/tools/mcp-tools.md
mattnowzari c89c871
Update explore-analyze/ai-features/agent-builder/tools/mcp-tools.md
mattnowzari 110f077
Update explore-analyze/ai-features/agent-builder/tools/mcp-tools.md
mattnowzari 4f76ab4
Update explore-analyze/ai-features/agent-builder/tools/mcp-tools.md
mattnowzari 2ecfc73
Address feedback
mattnowzari 3c621b0
Fix markdown formatting for consistency
mattnowzari 616aa59
More feedback changes
mattnowzari 444e4cf
Merge branch 'main' into mcp_docs
mattnowzari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+112 KB
explore-analyze/ai-features/agent-builder/images/mcp-bulkimport-config-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.3 KB
explore-analyze/ai-features/agent-builder/images/mcp-bulkimport-location.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.88 KB
explore-analyze/ai-features/agent-builder/images/mcp-connector-unavailable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+177 KB
...e-analyze/ai-features/agent-builder/images/mcp-createnewtool-config-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.58 KB
explore-analyze/ai-features/agent-builder/images/mcp-tool-execution-failed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.16 KB
explore-analyze/ai-features/agent-builder/images/mcp-tool-not-found.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
108 changes: 108 additions & 0 deletions
108
explore-analyze/ai-features/agent-builder/tools/mcp-tools.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| --- | ||
| navigation_title: "MCP tools" | ||
| applies_to: | ||
| stack: preview 9.3 | ||
| serverless: preview | ||
| --- | ||
|
|
||
|
|
||
|
|
||
| # Model Context Protocol (MCP) tools | ||
|
|
||
| Agent Builder MCP tools enable calling a remote [MCP server's](https://modelcontextprotocol.io/docs/learn/server-concepts) tools in your agent [chat](../chat.md). When you call an Agent Builder MCP tool, it calls the associated tool on the MCP server and returns its result. | ||
mattnowzari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Prerequisites | ||
mattnowzari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| To use external MCP tools, you first need to set up an [MCP Kibana Stack Connector](kibana://reference/connectors-kibana/mcp-action-type.md). This interface enables Agent Builder MCP tools to communicate with a remote MCP server. | ||
mattnowzari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Adding MCP tools | ||
|
|
||
mattnowzari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ### Adding a single tool | ||
mattnowzari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Once an MCP Kibana Stack Connector has been set up, an MCP tool can be created by clicking "New tool" on the [Tools](/explore-analyze/ai-features/agent-builder/tools.md) landing page. | ||
mattnowzari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| :::{image} ../images/mcp-createnewtool-config-example.png | ||
mattnowzari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| :screenshot: | ||
| :alt: Example configuration for a new MCP tool with the Context7 MCP server. | ||
| :width: 800px | ||
| ::: | ||
|
|
||
| MCP tools have the following configuration: | ||
mattnowzari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| MCP Server | ||
| : The MCP Kibana Stack Connector to interface with. | ||
|
|
||
| Tool | ||
| : The specific tool on MCP server to create an Agent Builder MCP tool for. | ||
|
|
||
| Once a tool is selected, the `Description` field of the tool automatically populates with the description provided by the MCP server. | ||
mattnowzari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Bulk import MCP tools | ||
mattnowzari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Agent Builder provides an efficient way to import multiple tools from an MCP server using the `Bulk import MCP tools` feature, which can be found in the Agent Builder [Tools](/explore-analyze/ai-features/agent-builder/tools.md) landing page under the "Manage MCP" dropdown. | ||
|
|
||
| :::{image} ../images/mcp-bulkimport-location.png | ||
| :screenshot: | ||
| :alt: How to bulk import MCP tools from an MCP server. | ||
| :width: 500px | ||
| ::: | ||
|
|
||
| Configuration for importing tools in bulk, while similar to single MCP tool creation, has some extra fields and automated behavior to consider. | ||
|
|
||
| :::{image} ../images/mcp-bulkimport-config-example.png | ||
| :screenshot: | ||
| :alt: Example configuration for bulk importing MCP tools from the Context7 MCP server. | ||
| :width: 800px | ||
| ::: | ||
|
|
||
| MCP Server | ||
| : The MCP Kibana Stack Connector to interface with. | ||
|
|
||
| Tools to import | ||
| : The specific tools from the MCP server to import. | ||
|
|
||
| Namespace | ||
| : A string to prepend to the tool name to aid in searching and organization. A namespace must start with a letter and contain only lowercase letters, numbers, and hyphens. | ||
|
|
||
| Clicking "Import tools" generates a series of MCP tools that map to the associated MCP server tools that were selected. | ||
|
|
||
| Imported tools have their `Tool ID` generated as `ramespace.tool-name`, where `namespace` is the user-provided namespace string, and `tool-name` is the name of the tool as provided by the MCP server. Furthermore, the `Description` field automatically populates. | ||
|
|
||
| ## How it works | ||
mattnowzari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| When an agent calls an MCP tool: | ||
|
|
||
| 1. Agent Builder retrieves the tool's input schema from the MCP Kibana Stack Connector. | ||
| 2. Agent Builder calls the MCP server tool with the required parameters. | ||
| 3. The MCP server returns the result directly to the LLM with no post-processing. | ||
mattnowzari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 4. The LLM interprets the result for the user. | ||
|
|
||
| ## Monitoring tool health | ||
|
|
||
| MCP tools have built-in health monitoring. Tools that are unhealthy display an icon next to their IDs in the [Tools](/explore-analyze/ai-features/agent-builder/tools.md) landing page. | ||
|
|
||
| An MCP tool is marked "unhealthy" when: | ||
|
|
||
| * The MCP tool's associated MCP Kibana Stack Connector is unavaiable. | ||
|
|
||
| :::{image} ../images/mcp-connector-unavailable.png | ||
| :screenshot: | ||
| :alt: Connector unavailable icon. | ||
| :width: 100px | ||
| ::: | ||
|
|
||
| * The MCP tool's associated tool on the MCP server no longer exists. | ||
|
|
||
| :::{image} ../images/mcp-tool-not-found.png | ||
| :screenshot: | ||
| :alt: Tool not found icon. | ||
| :width: 100px | ||
| ::: | ||
|
|
||
| * The MCP tool's execution failed. | ||
|
|
||
| :::{image} ../images/mcp-tool-execution-failed.png | ||
| :screenshot: | ||
| :alt: Tool execution failed icon. | ||
| :width: 100px | ||
| ::: | ||
mattnowzari marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.