diff --git a/src/Tool.php b/src/Tool.php index ed3077e..ffa3731 100644 --- a/src/Tool.php +++ b/src/Tool.php @@ -67,7 +67,9 @@ public static function fromArray(array $data): static if (!isset($data['inputSchema']['type']) || $data['inputSchema']['type'] !== 'object') { throw new \InvalidArgumentException("Tool inputSchema must be of type 'object'."); } - + if (isset($data['inputSchema']['properties']) && is_array($data['inputSchema']['properties']) && empty($data['inputSchema']['properties'])) { + $data['inputSchema']['properties'] = new \stdClass(); + } return new static( name: $data['name'],