MCPcopy
hub / github.com/CopilotKit/CopilotKit / removeTool

Method removeTool

packages/angular/src/lib/copilotkit.ts:541–553  ·  view source on GitHub ↗
(toolName: string, agentId?: string)

Source from the content-addressed store, hash-verified

539 }
540
541 removeTool(toolName: string, agentId?: string): void {
542 this.core.removeTool(toolName, agentId);
543 const keep = (config: { name: string; agentId?: string }) =>
544 config.name !== toolName ||
545 (agentId === undefined
546 ? !!config.agentId
547 : !this.#isSameAgentId(config, agentId));
548 this.#clientToolCallRenderConfigs.update((current) => current.filter(keep));
549 this.#humanInTheLoopToolRenderConfigs.update((current) =>
550 current.filter(keep),
551 );
552 this.#toolCallRenderConfigs.update((current) => current.filter(keep));
553 }
554
555 getAgent(agentId: string): AbstractAgent | undefined {
556 return this.core.getAgent(agentId);

Callers 5

registerRenderToolCallFunction · 0.45
registerFrontendToolFunction · 0.45
registerHumanInTheLoopFunction · 0.45
copilotkit.spec.tsFile · 0.45

Calls 2

filterMethod · 0.80
updateMethod · 0.65

Tested by

no test coverage detected