1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * This file is part of the Nexus MCP SDK package.
7: *
8: * (c) 2026 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\Server\Attribute;
15:
16: use Nexus\Mcp\Core\Schema\Annotations;
17: use Nexus\Mcp\Core\Schema\Icon;
18:
19: /**
20: * Marks a method as an MCP resource template, registered through `ServerBuilder::register()`.
21: */
22: #[\Attribute(\Attribute::TARGET_METHOD)]
23: final readonly class AsResourceTemplate
24: {
25: /**
26: * @param null|list<Icon> $icons
27: * @param null|array<string, mixed> $meta
28: */
29: public function __construct(
30: public string $uriTemplate,
31: public ?string $name = null,
32: public ?string $title = null,
33: public ?string $description = null,
34: public ?string $mimeType = null,
35: public ?Annotations $annotations = null,
36: public ?array $icons = null,
37: public ?array $meta = null,
38: ) {
39: }
40: }
41: