[Server] Use getDescription to get all descriptions. (#188)
* Remove `getSummary` method and update descriptions in snapshots and code * Add changelog entry --------- Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
This commit is contained in:
parent
7cb29125bd
commit
2c16b3e084
1 changed files with 16 additions and 42 deletions
|
|
@ -222,7 +222,7 @@ final class Discoverer implements DiscovererInterface
|
|||
case McpTool::class:
|
||||
$docBlock = $this->docBlockParser->parseDocBlock($method->getDocComment() ?? null);
|
||||
$name = $instance->name ?? ('__invoke' === $methodName ? $classShortName : $methodName);
|
||||
$description = $instance->description ?? $this->docBlockParser->getSummary($docBlock) ?? null;
|
||||
$description = $instance->description ?? $this->docBlockParser->getDescription($docBlock) ?? null;
|
||||
$inputSchema = $this->schemaGenerator->generate($method);
|
||||
$outputSchema = $this->schemaGenerator->generateOutputSchema($method);
|
||||
$tool = new Tool(
|
||||
|
|
@ -241,7 +241,7 @@ final class Discoverer implements DiscovererInterface
|
|||
case McpResource::class:
|
||||
$docBlock = $this->docBlockParser->parseDocBlock($method->getDocComment() ?? null);
|
||||
$name = $instance->name ?? ('__invoke' === $methodName ? $classShortName : $methodName);
|
||||
$description = $instance->description ?? $this->docBlockParser->getSummary($docBlock) ?? null;
|
||||
$description = $instance->description ?? $this->docBlockParser->getDescription($docBlock) ?? null;
|
||||
$resource = new Resource(
|
||||
$instance->uri,
|
||||
$name,
|
||||
|
|
@ -260,7 +260,7 @@ final class Discoverer implements DiscovererInterface
|
|||
case McpPrompt::class:
|
||||
$docBlock = $this->docBlockParser->parseDocBlock($method->getDocComment() ?? null);
|
||||
$name = $instance->name ?? ('__invoke' === $methodName ? $classShortName : $methodName);
|
||||
$description = $instance->description ?? $this->docBlockParser->getSummary($docBlock) ?? null;
|
||||
$description = $instance->description ?? $this->docBlockParser->getDescription($docBlock) ?? null;
|
||||
$arguments = [];
|
||||
$paramTags = $this->docBlockParser->getParamTags($docBlock);
|
||||
foreach ($method->getParameters() as $param) {
|
||||
|
|
@ -280,7 +280,7 @@ final class Discoverer implements DiscovererInterface
|
|||
case McpResourceTemplate::class:
|
||||
$docBlock = $this->docBlockParser->parseDocBlock($method->getDocComment() ?? null);
|
||||
$name = $instance->name ?? ('__invoke' === $methodName ? $classShortName : $methodName);
|
||||
$description = $instance->description ?? $this->docBlockParser->getSummary($docBlock) ?? null;
|
||||
$description = $instance->description ?? $this->docBlockParser->getDescription($docBlock) ?? null;
|
||||
$mimeType = $instance->mimeType;
|
||||
$annotations = $instance->annotations;
|
||||
$meta = $instance->meta ?? null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue