docs: clarify MCP pooling applies only to stdio tools

Agent-Logs-Url: https://github.com/bytedance/deer-flow/sessions/2dd9881d-54c6-45fd-90bc-154a09e29841

Co-authored-by: WillemJiang <219644+WillemJiang@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-26 02:07:35 +00:00
committed by GitHub
parent edeaa84563
commit ab2c7d07a5
@@ -1,4 +1,4 @@
"""Load MCP tools using langchain-mcp-adapters with persistent sessions.""" """Load MCP tools using langchain-mcp-adapters with stdio session pooling."""
from __future__ import annotations from __future__ import annotations
@@ -173,8 +173,10 @@ def _make_session_pool_tool(
async def get_mcp_tools() -> list[BaseTool]: async def get_mcp_tools() -> list[BaseTool]:
"""Get all tools from enabled MCP servers. """Get all tools from enabled MCP servers.
Tools are wrapped with persistent-session logic so that consecutive Tools using stdio transport are wrapped with persistent-session logic so
calls within the same thread reuse the same MCP session. consecutive calls within the same thread reuse the same MCP session.
HTTP/SSE tools are returned unwrapped to avoid cross-task TaskGroup
cleanup errors.
Returns: Returns:
List of LangChain tools from all enabled MCP servers. List of LangChain tools from all enabled MCP servers.