Skip to content

Commit 5447f97

Browse files
authored
feat: remove Notification as valid argument (#12)
* feat: remote Notification as valid argument * chore: trigger ci
1 parent fe06847 commit 5447f97

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/Server/RequestHandler/PingHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
namespace PhpLlm\McpSdk\Server\RequestHandler;
66

7-
use PhpLlm\McpSdk\Message\Notification;
87
use PhpLlm\McpSdk\Message\Request;
98
use PhpLlm\McpSdk\Message\Response;
109

1110
final class PingHandler extends BaseRequestHandler
1211
{
13-
public function createResponse(Request|Notification $message): Response
12+
public function createResponse(Request $message): Response
1413
{
1514
return new Response($message->id, []);
1615
}

src/Server/RequestHandler/ToolCallHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use PhpLlm\LlmChain\Exception\ExceptionInterface;
99
use PhpLlm\LlmChain\Model\Response\ToolCall;
1010
use PhpLlm\McpSdk\Message\Error;
11-
use PhpLlm\McpSdk\Message\Notification;
1211
use PhpLlm\McpSdk\Message\Request;
1312
use PhpLlm\McpSdk\Message\Response;
1413

@@ -19,7 +18,7 @@ public function __construct(
1918
) {
2019
}
2120

22-
public function createResponse(Request|Notification $message): Response|Error
21+
public function createResponse(Request $message): Response|Error
2322
{
2423
$name = $message->params['name'];
2524
$arguments = $message->params['arguments'] ?? [];

src/Server/RequestHandler/ToolListHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use PhpLlm\LlmChain\Chain\Toolbox\Metadata;
88
use PhpLlm\LlmChain\Chain\Toolbox\ToolboxInterface;
9-
use PhpLlm\McpSdk\Message\Notification;
109
use PhpLlm\McpSdk\Message\Request;
1110
use PhpLlm\McpSdk\Message\Response;
1211

@@ -17,7 +16,7 @@ public function __construct(
1716
) {
1817
}
1918

20-
public function createResponse(Request|Notification $message): Response
19+
public function createResponse(Request $message): Response
2120
{
2221
return new Response($message->id, [
2322
'tools' => array_map(function (Metadata $tool) {

0 commit comments

Comments
 (0)