Skip to content

Commit 34b0c97

Browse files
fix: refresh mcpToolDefinitions cache after MCP reconnect
After reconnectMcpServer succeeds, SessionManager's cached mcpToolDefinitions was stale, causing "Unknown MCP tool" errors when the model tried to call reconnected tools.
1 parent 7ab3d42 commit 34b0c97

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/session.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ export class SessionManager {
261261

262262
async reconnectMcpServer(name: string, config?: McpServerConfig): Promise<void> {
263263
await this.mcpManager.reconnect(name, config);
264+
this.mcpToolDefinitions = this.mcpManager.getMcpToolDefinitions();
264265
}
265266

266267
dispose(): void {

0 commit comments

Comments
 (0)