Chapter 7 — MCP & RAG
Agent Tools & Execution
How tools are assigned to an Agent node before runtime, how the Agent selects one during a conversation, and how results and errors travel back through the Registry.
Tool configuration
Before runtime, the MCP tools available to an Agent are configured on the corresponding Agent node. An Agent can use tools from multiple MCP servers, but it does not automatically receive access to every tool those servers expose — only the tools required for the specific use case are selected and assigned. Because the selected tools can come from different servers, a single Agent can combine capabilities from several external systems while keeping its toolset limited and purpose-specific.

Figure 3 — MCP server and Agent tool configuration.
Runtime tool selection
At runtime the Agent receives only the tools assigned to its node, together with their descriptions and input schemas. Based on the current user request, the conversation context and those descriptions, it determines whether a tool is required and selects the most appropriate one for the task. The execution request is then sent through the Registry to the server that exposes the selected tool, and the result is returned to the Agent to continue the conversation or generate the final response.

Figure 4 — Agent runtime tool selection.

Figure 5 — Selected set of tools assigned to the Agent.
Tool schema and error handling
Each tool is exposed to the Agent with its description and input schema. The description explains the tool's purpose; the schema defines the parameters required for execution, including their names, types and which are required. The Agent uses this both when deciding whether a tool fits the task and when constructing the call.
If execution fails, the MCP server returns a descriptive error message with enough context for the Agent to understand why. The Agent can then reconsider its decision — modifying the tool input, selecting another available tool, requesting more information from the user, or continuing without executing a tool. Tool execution therefore stays dynamic, with failures handled from the current conversation context rather than a predefined error flow.
End-to-end execution flow
The complete flow combines project configuration, Agent tool assignment, runtime decision-making and centralised execution. Before runtime, the servers available to the project are configured and the required tools assigned to the Agent node. At runtime the Agent receives the tool descriptions and schemas with the conversation context, decides whether an external capability is required, and selects a tool. The call is sent through the Registry, which communicates with the exposing server and performs the execution. On success the Agent uses the returned data to continue; on a descriptive error it evaluates the failure and determines the next action.

Figure 6 — End-to-end MCP execution flow, from project-level configuration to runtime selection, execution and result handling.