parser = new ToolParser(); } public function load(ToolMemory $toolMemory, string $yamlFile): void { $tools = $this->parser->parseFile($yamlFile); foreach ($tools as $toolData) { $toolMemory->write($toolData); } } }