Dynamic tool loading can be implemented via middleware that filters tools per request, using custom code to rebuild the agent with a new toolset, or through runtime discovery via MCP (Model Context Protocol).
langchain does not yet support native dynamic tool addition after agent creation, though a feature request has been filed to add agent.add_tool() methods [citation:3]. For now, three workable approaches exist. First, you can implement middleware that intercepts the request and filters the tool list based on user context, creating a new request with an updated toolset before passing to the model. Second, you can dynamically rebuild the agent when user roles change, though this requires reinitialization overhead. Third, for truly dynamic scenarios (like MCP servers), the langchain-mcp-adapters package provides load_mcp_tools() for runtime tool discovery based on authentication or context [citation:8].