Tools
Configure built-in agent tools in LibreChat
LibreChat tools are selected from the Agent Builder and run when an agent decides they are useful. This section covers built-in agent tools such as image generation, search, weather, computation, and private index lookup.
Not the same as Web Search or MCP
The search tools on this page are tools you add to a specific agent. LibreChat's built-in Web Search feature is configured separately, and custom third-party tools are usually added through MCP or Actions.
Quick Setup
Pick the Tool
Choose a tool from the table below and collect any required API keys, service URLs, or index names.
Add Credentials
Add the required values to your .env file, or let users provide their own credentials from the LibreChat UI when the tool prompts for them.
Restart LibreChat
Environment variable changes are loaded on restart.
| Deployment | Command |
|---|---|
| Docker | docker compose down && docker compose up -d |
| Local | Stop the server, then run npm run backend again |
Add the Tool to an Agent
In LibreChat, select Agents, create or edit an agent, open the agent's Tools list, select the tool, and save the agent.
Test in Chat
Start a chat with that agent and ask for something that requires the tool, such as a search, calculation, weather report, or image.
Current Built-In Tools
| Tool | Use it for | Required configuration | Details |
|---|---|---|---|
| OpenAI Image Tools | Generate and edit images with OpenAI image models | IMAGE_GEN_OAI_API_KEY; optional IMAGE_GEN_OAI_MODEL | Image Generation |
| Gemini Image Tools | Generate images and edit with image context using Gemini | GEMINI_API_KEY, GOOGLE_KEY, or GOOGLE_SERVICE_KEY_FILE; optional GEMINI_IMAGE_MODEL | Gemini Image Generation |
| DALL-E-3 | Legacy OpenAI image generation | DALLE3_API_KEY or DALLE_API_KEY | DALL-E |
| Flux | Cloud image generation and fine-tuned image models | FLUX_API_KEY; optional FLUX_API_BASE_URL | Flux |
| Stable Diffusion | Local or self-hosted image generation through Automatic1111 | SD_WEBUI_URL | Stable Diffusion |
| Google Search | Google Custom Search results for an agent | GOOGLE_SEARCH_API_KEY and GOOGLE_CSE_ID | Google Search |
| Tavily Search | Current web results optimized for agents | TAVILY_API_KEY | Tavily Search |
| Traversaal | AI search results with sources | TRAVERSAAL_API_KEY | Traversaal |
| Azure AI Search | Search a private Azure AI Search index | AZURE_AI_SEARCH_SERVICE_ENDPOINT, AZURE_AI_SEARCH_INDEX_NAME, AZURE_AI_SEARCH_API_KEY | Azure AI Search |
| OpenWeather | Current, forecast, historical, and daily weather data | OPENWEATHER_API_KEY | OpenWeather |
| Wolfram|Alpha | Math, computation, units, curated knowledge, and real-time data | WOLFRAM_APP_ID | Wolfram|Alpha |
| Calculator | Basic and complex calculations | None | Calculator |
Creating Custom Tools
Most custom tools should be added without editing LibreChat source code.
- Use MCP when you want to connect an agent to a local script, internal service, database, browser automation server, or a custom API wrapper. For example, a DuckDuckGo search tool can be exposed through an MCP server and then selected from the Agent Builder.
- Use Actions when the tool is an HTTP API that can be described with an OpenAPI schema.
- Edit LibreChat's source-level structured tools only when you are developing LibreChat itself. The legacy Tools and Plugins development guide remains available for contributors, but MCP and Actions are the recommended extension paths for deployments.
Tool Availability
Tools are identified internally by their pluginKey from LibreChat's api/app/clients/tools/manifest.json.
Use filteredTools to hide tools, or includedTools to allow only specific tools:
If a tool is not visible in the Agent Builder after restart, check the tool's environment variables, includedTools, filteredTools, and whether the agent's tools capability is enabled.
How is this guide?