MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / getToolsFromPipe

Method getToolsFromPipe

packages/core/src/pipes/pipes.ts:117–127  ·  view source on GitHub ↗
(
		pipe: Pipe,
	)

Source from the content-addressed store, hash-verified

115 }
116
117 private getToolsFromPipe(
118 pipe: Pipe,
119 ): Record<string, (...args: any[]) => Promise<any>> {
120 const tools: Record<string, (...args: any[]) => Promise<any>> = {};
121 if (pipe.tools && Array.isArray(pipe.tools)) {
122 pipe.tools.forEach((tool: Tool) => {
123 tools[tool.function.name] = tool.run;
124 });
125 }
126 return tools;
127 }
128
129 private async runTools(toolCalls: ToolCallResult[]): Promise<Message[]> {
130 const toolPromises = toolCalls.map(async (toolCall: ToolCallResult) => {

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected