MCP PHP SDK

McpResourceTemplate

Marks a PHP class definition as representing an MCP Resource Template.

This is informational, used for 'resources/templates/list'.

Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Attributes
#[Attribute]
\Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS

Table of Contents

Properties

$annotations  : Annotations|null
$description  : string|null
$meta  : array<string|int, mixed>|null
$mimeType  : string|null
$name  : string|null
$title  : string|null
$uriTemplate  : string

Methods

__construct()  : mixed

Properties

Methods

__construct()

public __construct(string $uriTemplate[, string|null $name = null ][, string|null $title = null ][, string|null $description = null ][, string|null $mimeType = null ][, Annotations|null $annotations = null ][, array<string, mixed>|null $meta = null ]) : mixed
Parameters
$uriTemplate : string

the URI template string (RFC 6570)

$name : string|null = null

a short identifier for the template type; defaults to the method name

$title : string|null = null

optional human-readable title for display in UI

$description : string|null = null

optional description; defaults to class DocBlock summary

$mimeType : string|null = null

optional default MIME type for matching resources

$annotations : Annotations|null = null

optional annotations describing the resource template

$meta : array<string, mixed>|null = null

optional metadata

On this page

Search results