Skip to content

Commit 87b9f94

Browse files
committed
fix: use JsonSchema interface instead of concrete class
Change type hint from `Illuminate\JsonSchema\JsonSchema` to `Illuminate\Contracts\JsonSchema\JsonSchema` in all tool schema methods to match the parent `Laravel\Mcp\Server\Tool::schema()` signature. This fixes the fatal error: Declaration of ...::schema(Illuminate\JsonSchema\JsonSchema $schema): array must be compatible with Laravel\Mcp\Server\Tool::schema(Illuminate\Contracts\JsonSchema\JsonSchema $schema): array
1 parent ff9a880 commit 87b9f94

17 files changed

Lines changed: 17 additions & 17 deletions

src/Mcp/Tools/GetAutoloadingOverhead.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetCPUIntensiveFunctions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetCallTree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetDatabaseQueries.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetExclusiveTimeFunctions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetIOOperations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetMemoryHogs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetMiddlewareAnalysis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetMostCalledFunctions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

src/Mcp/Tools/GetRecursiveFunctions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Codemonkey\SPXMcpServer\Mcp\Tools;
44

5-
use Illuminate\JsonSchema\JsonSchema;
5+
use Illuminate\Contracts\JsonSchema\JsonSchema;
66
use Laravel\Mcp\Request;
77
use Laravel\Mcp\Response;
88

0 commit comments

Comments
 (0)