1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | /** |
6: | * This file is part of the Nexus MCP SDK package. |
7: | * |
8: | * (c) 2025 John Paul E. Balandan, CPA <paulbalandan@gmail.com> |
9: | * |
10: | * For the full copyright and license information, please view |
11: | * the LICENSE file that was distributed with this source code. |
12: | */ |
13: | |
14: | namespace Nexus\Mcp\Client\Message\Request; |
15: | |
16: | use Nexus\Mcp\Message\PaginatedRequest; |
17: | |
18: | /** |
19: | * Sent from the client to request a list of resources the server has. |
20: | */ |
21: | final readonly class ListResourcesRequest extends PaginatedRequest implements ClientRequest |
22: | { |
23: | /** |
24: | * @param non-empty-string $jsonrpc JSON-RPC version. Must be 2.0. |
25: | * @param null|non-empty-string $cursor An opaque token representing the current pagination position. |
26: | * If provided, the server should return results starting after this cursor. |
27: | */ |
28: | public function __construct(string $jsonrpc, ?string $cursor = null) |
29: | { |
30: | parent::__construct($jsonrpc, 'resources/list', $cursor); |
31: | } |
32: | } |
33: |