22
33namespace KLP \KlpMcpServer \Server ;
44
5-
65use KLP \KlpMcpServer \Data \Requests \InitializeData ;
76use KLP \KlpMcpServer \Data \Resources \InitializeResource ;
87use KLP \KlpMcpServer \Exceptions \JsonRpcErrorException ;
@@ -26,16 +25,15 @@ interface MCPServerInterface
2625 * Registers a request handler with the protocol layer.
2726 * Request handlers process incoming method calls from the client.
2827 *
29- * @param RequestHandler $handler The request handler instance to register.
28+ * @param RequestHandler $handler The request handler instance to register.
3029 */
3130 public function registerRequestHandler (RequestHandler $ handler ): void ;
3231
3332 /**
3433 * Registers the necessary request handlers for MCP Tools functionality.
3534 * This typically includes handlers for 'tools/list' and 'tools/call'.
3635 *
37- * @param ToolRepository $toolRepository The repository containing available tools.
38- * @return \KLP\KlpMcpServer\Server\MCPServer
36+ * @param ToolRepository $toolRepository The repository containing available tools.
3937 */
4038 public function registerToolRepository (ToolRepository $ toolRepository ): \KLP \KlpMcpServer \Server \MCPServer ;
4139
@@ -54,7 +52,7 @@ public function disconnect(): void;
5452 * Registers a notification handler with the protocol layer.
5553 * Notification handlers process incoming notifications from the client (requests without an ID).
5654 *
57- * @param NotificationHandler $handler The notification handler instance to register.
55+ * @param NotificationHandler $handler The notification handler instance to register.
5856 */
5957 public function registerNotificationHandler (NotificationHandler $ handler ): void ;
6058
@@ -63,7 +61,7 @@ public function registerNotificationHandler(NotificationHandler $handler): void;
6361 * Stores client capabilities, checks protocol version, and marks the server as initialized.
6462 * Throws an error if the server is already initialized.
6563 *
66- * @param InitializeData $data The data object containing initialization parameters from the client.
64+ * @param InitializeData $data The data object containing initialization parameters from the client.
6765 * @return InitializeResource A resource object containing the server's initialization response.
6866 *
6967 * @throws JsonRpcErrorException If the server has already been initialized (JSON-RPC error code -32600).
@@ -74,8 +72,8 @@ public function initialize(InitializeData $data): InitializeResource;
7472 * Forwards a request message to a specific client via the protocol handler.
7573 * Used for server-initiated requests to the client (if supported by the protocol/transport).
7674 *
77- * @param string $clientId The identifier of the target client.
78- * @param array<string, mixed> $message The request message payload (following JSON-RPC structure).
75+ * @param string $clientId The identifier of the target client.
76+ * @param array<string, mixed> $message The request message payload (following JSON-RPC structure).
7977 */
8078 public function requestMessage (string $ clientId , array $ message ): void ;
8179}
0 commit comments