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:
Huixin615
2026-06-16 23:20:20 +08:00
committed by GitHub
parent 0966131b31
commit 1896722e66
6 changed files with 137 additions and 8 deletions
+8 -8
View File
@@ -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
```