mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-03 16:34:31 -07:00
Add support for MCP dynamic tool update by notifications/tools/list_changed (#14375)
This commit is contained in:
@@ -174,7 +174,15 @@ export class McpClientManager {
|
||||
this.toolRegistry,
|
||||
this.cliConfig.getPromptRegistry(),
|
||||
this.cliConfig.getWorkspaceContext(),
|
||||
this.cliConfig,
|
||||
this.cliConfig.getDebugMode(),
|
||||
async () => {
|
||||
debugLogger.log('Tools changed, updating Gemini context...');
|
||||
const geminiClient = this.cliConfig.getGeminiClient();
|
||||
if (geminiClient.isInitialized()) {
|
||||
await geminiClient.setTools();
|
||||
}
|
||||
},
|
||||
);
|
||||
if (!existing) {
|
||||
this.clients.set(name, client);
|
||||
|
||||
Reference in New Issue
Block a user