1414use Mcp \Exception \InvalidArgumentException ;
1515use Mcp \Schema \JsonRpc \Response ;
1616use Mcp \Schema \JsonRpc \ResultInterface ;
17- use Mcp \Schema \Resource ;
17+ use Mcp \Schema \Resource as ResourceSchema ;
1818
1919/**
2020 * The server's response to a resources/list request from the client.
2121 *
22- * @phpstan-import-type ResourceData from Resource
22+ * @phpstan-import-type ResourceData from ResourceSchema
2323 *
2424 * @author Kyrian Obikwelu <koshnawaza@gmail.com>
2525 */
2626class ListResourcesResult implements ResultInterface
2727{
2828 /**
29- * @param array<Resource > $resources the list of resource definitions
30- * @param string|null $nextCursor An opaque token representing the pagination position after the last returned result.
29+ * @param array<ResourceSchema > $resources the list of resource definitions
30+ * @param string|null $nextCursor An opaque token representing the pagination position after the last returned result.
3131 *
3232 * If present, there may be more results available.
3333 */
@@ -50,14 +50,14 @@ public static function fromArray(array $data): self
5050 }
5151
5252 return new self (
53- array_map (fn (array $ resource ) => Resource ::fromArray ($ resource ), $ data ['resources ' ]),
53+ array_map (fn (array $ resource ) => ResourceSchema ::fromArray ($ resource ), $ data ['resources ' ]),
5454 $ data ['nextCursor ' ] ?? null
5555 );
5656 }
5757
5858 /**
5959 * @return array{
60- * resources: array<Resource >,
60+ * resources: array<ResourceSchema >,
6161 * nextCursor?: string,
6262 * }
6363 */
0 commit comments