MCP PHP SDK

ElementMetadataResolver

FinalYes

Derives an element's name and description from its handler method, used by both attribute discovery and reflection-based manual registration.

Tags
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Methods

resolveDescription()  : string|null
Explicit descriptions win; otherwise the summary of the method's doc block is used.
resolveName()  : string
Explicit names win; otherwise invokable classes are named after the class, regular handlers after the method.
__construct()  : mixed

Methods

resolveDescription()

Explicit descriptions win; otherwise the summary of the method's doc block is used.

public static resolveDescription(ReflectionMethod $method, string|null $description, DocBlockParser $docBlockParser) : string|null
Parameters
$method : ReflectionMethod
$description : string|null
$docBlockParser : DocBlockParser
Return values
string|null

resolveName()

Explicit names win; otherwise invokable classes are named after the class, regular handlers after the method.

public static resolveName(ReflectionMethod $method, string|null $name) : string
Parameters
$method : ReflectionMethod
$name : string|null
Return values
string
On this page

Search results