Skip to content

Commit dbdef07

Browse files
Update Boost for laravel/mcp ^0.4.1 compatibility (#375)
* Bump laravel/mcp version to ^0.4 in composer.json * Refactor JSON schema imports to use Illuminate\Contracts\JsonSchema * Bump laravel/mcp version to ^0.4.1 in composer.json * Update input schema return types to use \Illuminate\JsonSchema\Types\Type * Simplify type imports in MCP tools Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com> --------- Signed-off-by: Pushpak Chhajed <pushpak1300@gmail.com> Co-authored-by: Pushpak Chhajed <pushpak1300@gmail.com>
1 parent 5efd97a commit dbdef07

File tree

12 files changed

+34
-23
lines changed

12 files changed

+34
-23
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"illuminate/contracts": "^10.49.0|^11.45.3|^12.28.1",
2020
"illuminate/routing": "^10.49.0|^11.45.3|^12.28.1",
2121
"illuminate/support": "^10.49.0|^11.45.3|^12.28.1",
22-
"laravel/mcp": "^0.3.4",
22+
"laravel/mcp": "^0.4.1",
2323
"laravel/prompts": "0.1.25|^0.3.6",
2424
"laravel/roster": "^0.2.9"
2525
},

src/Mcp/Tools/BrowserLogs.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace Laravel\Boost\Mcp\Tools;
66

7-
use Illuminate\JsonSchema\JsonSchema;
7+
use Illuminate\Contracts\JsonSchema\JsonSchema;
8+
use Illuminate\JsonSchema\Types\Type;
89
use Laravel\Boost\Concerns\ReadsLogs;
910
use Laravel\Mcp\Request;
1011
use Laravel\Mcp\Response;
@@ -24,7 +25,7 @@ class BrowserLogs extends Tool
2425
/**
2526
* Get the tool's input schema.
2627
*
27-
* @return array<string, JsonSchema>
28+
* @return array<string, Type>
2829
*/
2930
public function schema(JsonSchema $schema): array
3031
{

src/Mcp/Tools/DatabaseQuery.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace Laravel\Boost\Mcp\Tools;
66

7-
use Illuminate\JsonSchema\JsonSchema;
7+
use Illuminate\Contracts\JsonSchema\JsonSchema;
8+
use Illuminate\JsonSchema\Types\Type;
89
use Illuminate\Support\Facades\DB;
910
use Laravel\Mcp\Request;
1011
use Laravel\Mcp\Response;
@@ -23,7 +24,7 @@ class DatabaseQuery extends Tool
2324
/**
2425
* Get the tool's input schema.
2526
*
26-
* @return array<string, JsonSchema>
27+
* @return array<string, Type>
2728
*/
2829
public function schema(JsonSchema $schema): array
2930
{

src/Mcp/Tools/DatabaseSchema.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
namespace Laravel\Boost\Mcp\Tools;
66

77
use Exception;
8-
use Illuminate\JsonSchema\JsonSchema;
8+
use Illuminate\Contracts\JsonSchema\JsonSchema;
9+
use Illuminate\JsonSchema\Types\Type;
910
use Illuminate\Support\Arr;
1011
use Illuminate\Support\Facades\Cache;
1112
use Illuminate\Support\Facades\DB;
@@ -28,7 +29,7 @@ class DatabaseSchema extends Tool
2829
/**
2930
* Get the tool's input schema.
3031
*
31-
* @return array<string, JsonSchema>
32+
* @return array<string, Type>
3233
*/
3334
public function schema(JsonSchema $schema): array
3435
{

src/Mcp/Tools/GetAbsoluteUrl.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace Laravel\Boost\Mcp\Tools;
66

7-
use Illuminate\JsonSchema\JsonSchema;
7+
use Illuminate\Contracts\JsonSchema\JsonSchema;
8+
use Illuminate\JsonSchema\Types\Type;
89
use Laravel\Mcp\Request;
910
use Laravel\Mcp\Response;
1011
use Laravel\Mcp\Server\Tool;
@@ -21,7 +22,7 @@ class GetAbsoluteUrl extends Tool
2122
/**
2223
* Get the tool's input schema.
2324
*
24-
* @return array<string, JsonSchema>
25+
* @return array<string, Type>
2526
*/
2627
public function schema(JsonSchema $schema): array
2728
{

src/Mcp/Tools/GetConfig.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace Laravel\Boost\Mcp\Tools;
66

7-
use Illuminate\JsonSchema\JsonSchema;
7+
use Illuminate\Contracts\JsonSchema\JsonSchema;
8+
use Illuminate\JsonSchema\Types\Type;
89
use Illuminate\Support\Facades\Config;
910
use Laravel\Mcp\Request;
1011
use Laravel\Mcp\Response;
@@ -19,7 +20,7 @@ class GetConfig extends Tool
1920
/**
2021
* Get the tool's input schema.
2122
*
22-
* @return array<string, JsonSchema>
23+
* @return array<string, Type>
2324
*/
2425
public function schema(JsonSchema $schema): array
2526
{

src/Mcp/Tools/ListAvailableEnvVars.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace Laravel\Boost\Mcp\Tools;
66

7-
use Illuminate\JsonSchema\JsonSchema;
7+
use Illuminate\Contracts\JsonSchema\JsonSchema;
8+
use Illuminate\JsonSchema\Types\Type;
89
use Laravel\Mcp\Request;
910
use Laravel\Mcp\Response;
1011
use Laravel\Mcp\Server\Tool;
@@ -21,7 +22,7 @@ class ListAvailableEnvVars extends Tool
2122
/**
2223
* Get the tool's input schema.
2324
*
24-
* @return array<string, JsonSchema>
25+
* @return array<string, Type>
2526
*/
2627
public function schema(JsonSchema $schema): array
2728
{

src/Mcp/Tools/ListRoutes.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace Laravel\Boost\Mcp\Tools;
66

7-
use Illuminate\JsonSchema\JsonSchema;
7+
use Illuminate\Contracts\JsonSchema\JsonSchema;
8+
use Illuminate\JsonSchema\Types\Type;
89
use Illuminate\Support\Facades\Artisan;
910
use Laravel\Mcp\Request;
1011
use Laravel\Mcp\Response;
@@ -24,7 +25,7 @@ class ListRoutes extends Tool
2425
/**
2526
* Get the tool's input schema.
2627
*
27-
* @return array<string, JsonSchema>
28+
* @return array<string, Type>
2829
*/
2930
public function schema(JsonSchema $schema): array
3031
{

src/Mcp/Tools/ReadLogEntries.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace Laravel\Boost\Mcp\Tools;
66

7-
use Illuminate\JsonSchema\JsonSchema;
7+
use Illuminate\Contracts\JsonSchema\JsonSchema;
8+
use Illuminate\JsonSchema\Types\Type;
89
use Laravel\Boost\Concerns\ReadsLogs;
910
use Laravel\Mcp\Request;
1011
use Laravel\Mcp\Response;
@@ -24,7 +25,7 @@ class ReadLogEntries extends Tool
2425
/**
2526
* Get the tool's input schema.
2627
*
27-
* @return array<string, JsonSchema>
28+
* @return array<string, Type>
2829
*/
2930
public function schema(JsonSchema $schema): array
3031
{

src/Mcp/Tools/ReportFeedback.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
namespace Laravel\Boost\Mcp\Tools;
66

77
use Generator;
8-
use Illuminate\JsonSchema\JsonSchema;
8+
use Illuminate\Contracts\JsonSchema\JsonSchema;
9+
use Illuminate\JsonSchema\Types\Type;
910
use Laravel\Boost\Concerns\MakesHttpRequests;
1011
use Laravel\Mcp\Request;
1112
use Laravel\Mcp\Response;
@@ -20,7 +21,7 @@ class ReportFeedback extends Tool
2021
/**
2122
* Get the tool's input schema.
2223
*
23-
* @return array<string, JsonSchema>
24+
* @return array<string, Type>
2425
*/
2526
public function schema(JsonSchema $schema): array
2627
{

0 commit comments

Comments
 (0)