mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-17 13:05:58 +00:00
fix: add MCP tools cache reset endpoint (#3602)
* fix: add MCP tools cache reset endpoint * docs: clarify MCP cache reset scope
This commit is contained in:
@@ -299,6 +299,26 @@ deployment needs additional trusted launchers.
|
||||
}
|
||||
```
|
||||
|
||||
#### Reset MCP Tools Cache
|
||||
|
||||
Clear cached MCP tools and persistent MCP sessions process-wide. This affects
|
||||
all threads and users in the current Gateway process. Tools are loaded again
|
||||
from configured MCP servers on the next agent run or tool lookup.
|
||||
|
||||
```http
|
||||
POST /api/mcp/cache/reset
|
||||
```
|
||||
|
||||
Requires an authenticated admin session.
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "MCP tools cache reset. Tools will reload on next use."
|
||||
}
|
||||
```
|
||||
|
||||
### Skills
|
||||
|
||||
#### List Skills
|
||||
|
||||
@@ -427,17 +427,17 @@ SKILL.md Format:
|
||||
### Configuration Reload
|
||||
|
||||
```
|
||||
1. Client updates MCP config
|
||||
1. Client updates MCP config or requests a cache reset
|
||||
PUT /api/mcp/config
|
||||
POST /api/mcp/cache/reset
|
||||
|
||||
2. Gateway writes extensions_config.json
|
||||
- Updates mcpServers section
|
||||
- File mtime changes
|
||||
2. Gateway updates runtime state
|
||||
- PUT writes extensions_config.json and reloads configuration
|
||||
- Both endpoints reset the MCP tools cache and persistent sessions
|
||||
|
||||
3. MCP Manager detects change
|
||||
- get_cached_mcp_tools() checks mtime
|
||||
- If changed: reinitializes MCP client
|
||||
- Loads updated server configurations
|
||||
3. MCP Manager reloads on next use
|
||||
- get_cached_mcp_tools() lazily reinitializes MCP tools
|
||||
- Loads current server configurations and tool lists
|
||||
|
||||
4. Next agent run uses new tools
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user