diff --git a/src/Server/RequestHandler/ToolCallHandler.php b/src/Server/RequestHandler/ToolCallHandler.php index 521bc66..2af41a3 100644 --- a/src/Server/RequestHandler/ToolCallHandler.php +++ b/src/Server/RequestHandler/ToolCallHandler.php @@ -4,7 +4,7 @@ namespace PhpLlm\McpSdk\Server\RequestHandler; -use PhpLlm\LlmChain\Chain\ToolBox\ToolBoxInterface; +use PhpLlm\LlmChain\Chain\Toolbox\ToolboxInterface; use PhpLlm\LlmChain\Exception\ExceptionInterface; use PhpLlm\LlmChain\Model\Response\ToolCall; use PhpLlm\McpSdk\Message\Error; @@ -15,7 +15,7 @@ final class ToolCallHandler extends BaseRequestHandler { public function __construct( - private readonly ToolBoxInterface $toolBox, + private readonly ToolboxInterface $toolbox, ) { } @@ -25,7 +25,7 @@ public function createResponse(Request|Notification $message): Response|Error $arguments = $message->params['arguments'] ?? []; try { - $result = $this->toolBox->execute(new ToolCall(uniqid(), $name, $arguments)); + $result = $this->toolbox->execute(new ToolCall(uniqid(), $name, $arguments)); } catch (ExceptionInterface) { return Error::internalError($message->id, 'Error while executing tool'); } diff --git a/src/Server/RequestHandler/ToolListHandler.php b/src/Server/RequestHandler/ToolListHandler.php index 4ddc10a..f1a1142 100644 --- a/src/Server/RequestHandler/ToolListHandler.php +++ b/src/Server/RequestHandler/ToolListHandler.php @@ -4,8 +4,8 @@ namespace PhpLlm\McpSdk\Server\RequestHandler; -use PhpLlm\LlmChain\Chain\ToolBox\Metadata; -use PhpLlm\LlmChain\Chain\ToolBox\ToolBoxInterface; +use PhpLlm\LlmChain\Chain\Toolbox\Metadata; +use PhpLlm\LlmChain\Chain\Toolbox\ToolboxInterface; use PhpLlm\McpSdk\Message\Notification; use PhpLlm\McpSdk\Message\Request; use PhpLlm\McpSdk\Message\Response; @@ -13,7 +13,7 @@ final class ToolListHandler extends BaseRequestHandler { public function __construct( - private readonly ToolBoxInterface $toolBox, + private readonly ToolboxInterface $toolbox, ) { } @@ -29,7 +29,7 @@ public function createResponse(Request|Notification $message): Response '$schema' => 'http://json-schema.org/draft-07/schema#', ], ]; - }, $this->toolBox->getMap()), + }, $this->toolbox->getMap()), ]); }