MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / toggleToolAlwaysAllow

Method toggleToolAlwaysAllow

src/services/mcp/McpHub.ts:2382–2397  ·  view source on GitHub ↗
(
		serverName: string,
		source: "global" | "project",
		toolName: string,
		shouldAllow: boolean,
	)

Source from the content-addressed store, hash-verified

2380 }
2381
2382 async toggleToolAlwaysAllow(
2383 serverName: string,
2384 source: "global" | "project",
2385 toolName: string,
2386 shouldAllow: boolean,
2387 ): Promise<void> {
2388 try {
2389 await this.updateServerToolList(serverName, source, toolName, "alwaysAllow", shouldAllow)
2390 } catch (error) {
2391 this.showErrorMessage(
2392 `Failed to toggle always allow for tool "${toolName}" on server "${serverName}" with source "${source}"`,
2393 error,
2394 )
2395 throw error
2396 }
2397 }
2398
2399 async toggleToolEnabledForPrompt(
2400 serverName: string,

Callers 2

webviewMessageHandlerFunction · 0.80
McpHub.spec.tsFile · 0.80

Calls 2

updateServerToolListMethod · 0.95
showErrorMessageMethod · 0.95

Tested by

no test coverage detected