Adopt Schema component in server handlers

This commit is contained in:
Christopher Hertel 2025-08-03 22:06:46 +02:00
commit 09707b4798
No known key found for this signature in database
GPG key ID: 111F6BFF7B6B5AA3

View file

@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mcp\Schema\JsonRpc;
/**
* Interface for all incoming JSON-RPC messages that should be processed by a handler, and are expected to have a method.
*
* @author Christopher Hertel <mail@christopher-hertel.de>
*/
interface HasMethodInterface
{
public static function getMethod(): string;
/**
* @param array<string, mixed> $data
*/
public static function fromArray(array $data): self;
}