Skip to content

Commit 64622d9

Browse files
committed
Refactor
1 parent 5a9a120 commit 64622d9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/Capability/Discovery/SchemaGenerator.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,10 @@ public function generateOutputSchema(\ReflectionMethod|\ReflectionFunction $refl
9494
{
9595
// Only return outputSchema if explicitly provided in McpTool attribute
9696
$mcpToolAttrs = $reflection->getAttributes(McpTool::class, \ReflectionAttribute::IS_INSTANCEOF);
97-
if (!empty($mcpToolAttrs)) {
97+
if ($mcpToolAttrs) {
9898
$mcpToolInstance = $mcpToolAttrs[0]->newInstance();
99-
if (null !== $mcpToolInstance->outputSchema) {
100-
return $mcpToolInstance->outputSchema;
101-
}
99+
100+
return $mcpToolInstance->outputSchema;
102101
}
103102

104103
return null;

0 commit comments

Comments
 (0)