MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / addFrontendTool

Method addFrontendTool

packages/angular/src/lib/copilotkit.ts:277–290  ·  view source on GitHub ↗
(
    clientToolWithInjector: FrontendToolConfig & {
      injector: Injector;
    },
  )

Source from the content-addressed store, hash-verified

275 }
276
277 addFrontendTool(
278 clientToolWithInjector: FrontendToolConfig & {
279 injector: Injector;
280 },
281 ): void {
282 const tool = this.#bindClientTool(clientToolWithInjector);
283
284 this.core.addTool(tool);
285
286 this.#clientToolCallRenderConfigs.update((current) => [
287 ...current,
288 clientToolWithInjector,
289 ]);
290 }
291
292 addRenderToolCall(renderConfig: RenderToolCallConfig): void {
293 this.#toolCallRenderConfigs.update((current) => [...current, renderConfig]);

Callers 3

constructorMethod · 0.95
registerFrontendToolFunction · 0.80
copilotkit.spec.tsFile · 0.80

Calls 3

#bindClientToolMethod · 0.95
updateMethod · 0.65
addToolMethod · 0.45

Tested by

no test coverage detected