[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:
落月 2026-01-12 05:08:05 +08:00 • committed by GitHub
commit 2c16b3e084
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -108,7 +108,7 @@ final class ArrayLoader implements LoaderInterface
$docBlock = $docBlockParser->parseDocBlock($reflection->getDocComment() ?? null);
$name = $data['name'] ?? ('__invoke' === $methodName ? $classShortName : $methodName);
$description = $data['description'] ?? $docBlockParser->getSummary($docBlock) ?? null;
$description = $data['description'] ?? $docBlockParser->getDescription($docBlock) ?? null;
}
$inputSchema = $data['inputSchema'] ?? $schemaGenerator->generate($reflection);
@ -149,7 +149,7 @@ final class ArrayLoader implements LoaderInterface
$docBlock = $docBlockParser->parseDocBlock($reflection->getDocComment() ?? null);
$name = $data['name'] ?? ('__invoke' === $methodName ? $classShortName : $methodName);
$description = $data['description'] ?? $docBlockParser->getSummary($docBlock) ?? null;
$description = $data['description'] ?? $docBlockParser->getDescription($docBlock) ?? null;
}
$resource = new Resource(
@ -189,7 +189,7 @@ final class ArrayLoader implements LoaderInterface
$docBlock = $docBlockParser->parseDocBlock($reflection->getDocComment() ?? null);
$name = $data['name'] ?? ('__invoke' === $methodName ? $classShortName : $methodName);
$description = $data['description'] ?? $docBlockParser->getSummary($docBlock) ?? null;
$description = $data['description'] ?? $docBlockParser->getDescription($docBlock) ?? null;
}
$template = new ResourceTemplate(
@ -228,7 +228,7 @@ final class ArrayLoader implements LoaderInterface
$docBlock = $docBlockParser->parseDocBlock($reflection->getDocComment() ?? null);
$name = $data['name'] ?? ('__invoke' === $methodName ? $classShortName : $methodName);
$description = $data['description'] ?? $docBlockParser->getSummary($docBlock) ?? null;
$description = $data['description'] ?? $docBlockParser->getDescription($docBlock) ?? null;
}
$arguments = [];