MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / refreshTools

Method refreshTools

src/mcp/client.ts:242–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240 }
241
242 private async refreshTools(): Promise<void> {
243 try {
244 const r = await this.requestWithTimeout<{ tools: MCPToolDef[] }>('tools/list', {}, 5000);
245 this.tools = r.tools ?? [];
246 this.emit('tools-changed', this.tools);
247 } catch (e: any) {
248 logger.warn(`MCP ${this.name} refreshTools failed`, { err: e.message });
249 }
250 }
251
252 private requestWithTimeout<T>(
253 method: string,

Callers 1

handleMessageMethod · 0.95

Calls 2

warnMethod · 0.80
emitMethod · 0.45

Tested by

no test coverage detected