{"version":"2.1.269","anchor":"toolsearchtool-rebuilt-as-a-per-turn-factory-with-isolated-m","canonical_anchor":"toolsearchtool-rebuilt-as-a-per-turn-factory-with-isolated-m","heading":"ToolSearchTool rebuilt as a per-turn factory with isolated MCP client state","tier":"internal","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/toolsearchtool-rebuilt-as-a-per-turn-factory-with-isolated-m","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### ToolSearchTool rebuilt as a per-turn factory with isolated MCP client state\n\nToolSearchTool now builds a fresh instance per turn with its own isolated MCP client state\n\n**What**\n\nThe internal `ToolSearchTool` (used to find and load tool definitions on demand) is now built by a `create` factory that returns a fresh, self-contained copy for each tool instantiation, instead of sharing one `call` method across the board. It also reads MCP (Model Context Protocol, the standard Claude Code uses to talk to external tool servers) clients through a new `turnMcpClients` accessor scoped to the current turn's options, rather than through a shared option passed in directly.\n\n**Why**\n\nThis is an internal restructuring that isolates MCP client state per turn, reducing the chance that state from one turn or tool instance leaks into another.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}