-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathMcpResourceTemplate.php
More file actions
30 lines (27 loc) · 1.07 KB
/
McpResourceTemplate.php
File metadata and controls
30 lines (27 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
namespace PhpMcp\Server\Attributes;
use Attribute;
use PhpMcp\Schema\Annotations;
/**
* Marks a PHP class definition as representing an MCP Resource Template.
* This is informational, used for 'resources/templates/list'.
*/
#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS)]
class McpResourceTemplate
{
/**
* @param string $uriTemplate The URI template string (RFC 6570).
* @param ?string $name A human-readable name for the template type. If null, a default might be generated from the method name.
* @param ?string $description Optional description. Defaults to class DocBlock summary.
* @param ?string $mimeType Optional default MIME type for matching resources.
* @param ?Annotations $annotations Optional annotations describing the resource template.
*/
public function __construct(
public string $uriTemplate,
public ?string $name = null,
public ?string $description = null,
public ?string $mimeType = null,
public ?Annotations $annotations = null,
) {
}
}