Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Server/RequestHandler/ToolCallHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -15,7 +15,7 @@
final class ToolCallHandler extends BaseRequestHandler
{
public function __construct(
private readonly ToolBoxInterface $toolBox,
private readonly ToolboxInterface $toolbox,
) {
}

Expand All @@ -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');
}
Expand Down
8 changes: 4 additions & 4 deletions src/Server/RequestHandler/ToolListHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

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;

final class ToolListHandler extends BaseRequestHandler
{
public function __construct(
private readonly ToolBoxInterface $toolBox,
private readonly ToolboxInterface $toolbox,
) {
}

Expand All @@ -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()),
]);
}

Expand Down