Skip to content

Combine MCP Retriever with other tools ​

This architecture uses one catalog for the MCP Retriever, which accesses internal sources, and additional MCP servers for web search, image generation, or business actions. RAG no longer uses a separate HTTP request: every search goes through the tool loop.

Connect the catalog to a palette block ​

If the block running the path offers an MCP tool connection, configure an MCP - List tools block with Retriever and the other servers you need. Connect that catalog through the consuming block’s Contextual ports section, leaving it outside the main path.

If multiple tool connections are offered, you can distribute servers across several catalogs. Fill in the block’s fields, connect its outputs, and test internal questions, requests needing an external tool, and direct answers.

For a block offering a source connection, configure the selection in Data Sources and follow the connection guide. The connection type depends on the selected block.

Build the path one block at a time ​

The following example groups servers in one catalog and configures the loop explicitly with standard blocks.

RAG + MCP
100 %
RAG + MCPThe catalog supplies the instruction and request. If the model requests a tool, Studio executes it and returns to the same instruction. Otherwise, the answer ends the turn. Start. MCP - List tools : Retriever + other servers. LLM instruction : Prepare the instruction. LLM request : Answer or request a tool. Condition : Any tools to call? : gt (length chatCompletion-1.genericToolCalls) 0 : Direct answer. MCP - Call tools : Execute the calls. Answer in Semantics Chat : contenttoolsStartStartMCP - List tools : Retriever + other serversMCP - List toolsRetriever + other serversLLM instruction : Prepare the instructionLLM instructionPrepare the instructionLLM request : Answer or request a toolLLM requestAnswer or request a toolCondition : Any tools to call?ConditionAny tools to call?Ifgt (length chatCompletion-…ElseDirect answerMCP - Call tools : Execute the callsMCP - Call toolsExecute the callsAnswer in Semantics Chat : contentAnswer in Semantics Chatcontent

Guided walkthrough ​

  1. listTools-1 loads MCP Retriever and the other allowed servers.
  2. generatePrompt-1 prepares rules, history, date, and the tool catalog.
  3. chatCompletion-1 receives the instruction and {{listTools-1.tools}}.
  4. For an internal question, the model requests retriever_retrieve_information.
  5. For recent information or an action, it may request another tool in the same turn or during the next loop iteration.
  6. The condition inspects genericToolCalls, then callTools-1 runs those calls using catalog routing.
  7. Results are automatically appended to history. The path returns to generatePrompt-1, which recalculates the prompt, then to chatCompletion-1.
  8. When the model requests no additional tool, content is the final answer.

MCP catalog ​

Configure several servers in the same MCP - List tools block:

json
[
  {
    "name": "Wikit Retriever",
    "url": "<MCP_RETRIEVER_URL>/mcp",
    "allowedTools": [
      "retriever_retrieve_information",
      "retriever_get_table_metadata",
      "retriever_run_sql_query"
    ],
    "meta": {
      "llmConnectorId": "<LLM_CONNECTOR_ID>"
    }
  },
  {
    "name": "Web Search",
    "url": "<MCP_WEBSEARCH_URL>/mcp",
    "allowedTools": []
  }
]

An empty allowedTools list enables every tool exposed by that server. In production, limit it to the tools that are actually needed, especially for actions with external effects.

Important variables ​

ReferencePurpose
{{listTools-1.tools}}Merged catalog passed to the model
{{listTools-1.toolServerRouting}}Mapping from each tool to its MCP server
{{generatePrompt-1.instruction}}Initial instruction
{{chatCompletion-1.genericToolCalls}}One or more calls requested by the model
{{callTools-1.toolCallResults}}Results from Retriever and the other tools

This workflow uses neither an HTTP retrieval output nor an elasticsearch document configuration.

Three possible routes ​

The model calls retriever_retrieve_information, receives relevant passages, and answers with document citations. If it identifies a table, it can continue with the metadata and read-only SQL tools.

Additional search or action ​

Internal sources are insufficient, or an action is required. The model can call web search or a business service, then clearly distinguish internal results from external ones.

Direct answer ​

The question requires no tool. The model immediately produces content, and the condition ends the workflow. For a factual question about internal sources, however, the instruction should require a Retriever call before answering.

Business example ​

User: Is our product compatible with the new regulation published this month?

Assistant: According to the internal product documentation, the offer covers requirements A and B. The official source published this month adds requirement C, which is not yet in your documents. Have this point reviewed.

The model can request Retriever and web search in parallel or sequentially, then cite each origin without mixing confidence levels.

Checks in Studio ​

MCP catalog ​

  • correct Retriever and additional server URLs;
  • retriever_retrieve_information is present in fetched tools;
  • correct llmConnectorId in Retriever metadata;
  • sensitive tools are explicitly restricted.

Instruction and request ​

  • explicit rules for choosing internal sources, external search, and actions;
  • a requirement to use Retriever before answering from internal documents;
  • both the instruction and request are connected to {{listTools-1.tools}};
  • streaming and timeout are suitable.

Condition and loop ​

  • expression gt (length chatCompletion-1.genericToolCalls) 0;
  • calls from {{chatCompletion-1.genericToolCalls}};
  • routing from {{listTools-1.toolServerRouting}};
  • return to generatePrompt-1, which rebuilds the instruction with results and tools;
  • loop back to the LLM and a final exit route;
  • failure branches connected to a user-friendly message.

Loop and context

Limit the number of tools and give the model a clear exit rule. Also configure expiration for old tool results in the LLM instruction so long conversations do not fill the context.