We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15d5466 commit de8a32eCopy full SHA for de8a32e
src/Tool.php
@@ -67,7 +67,9 @@ public static function fromArray(array $data): static
67
if (!isset($data['inputSchema']['type']) || $data['inputSchema']['type'] !== 'object') {
68
throw new \InvalidArgumentException("Tool inputSchema must be of type 'object'.");
69
}
70
-
+ if (isset($data['inputSchema']['properties']) && is_array($data['inputSchema']['properties']) && empty($data['inputSchema']['properties'])) {
71
+ $data['inputSchema']['properties'] = new \stdClass();
72
+ }
73
74
return new static(
75
name: $data['name'],
0 commit comments