Skip to content

Commit cb4df86

Browse files
committed
wip
1 parent ab51f09 commit cb4df86

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/Console/ExecuteToolCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function handle(): int
4646

4747
try {
4848
/** @var Response $response */
49-
$response = $tool->handle($request);
49+
$response = $tool->handle($request); // @phpstan-ignore-line
5050
} catch (Throwable $e) {
5151
$errorResult = Response::error("Tool execution failed (E_THROWABLE): {$e->getMessage()}");
5252

src/Mcp/Tools/GetConfig.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
#[IsReadOnly]
1515
class GetConfig extends Tool
1616
{
17-
public function description(): string
18-
{
19-
return 'Get the value of a specific config variable using dot notation (e.g., "app.name", "database.default")';
20-
}
17+
protected string $description = 'Get the value of a specific config variable using dot notation (e.g., "app.name", "database.default")';
2118

2219
/**
2320
* Get the tool's input schema.
@@ -27,8 +24,8 @@ public function description(): string
2724
public function schema(JsonSchema $schema): array
2825
{
2926
return [
30-
$schema
31-
->string('key')
27+
'key' => $schema
28+
->string()
3229
->description('The config key in dot notation (e.g., "app.name", "database.default")')
3330
->required(),
3431
];
@@ -39,7 +36,7 @@ public function schema(JsonSchema $schema): array
3936
*/
4037
public function handle(Request $request): Response
4138
{
42-
$key = $request->get('key');
39+
$key = $request->get('key')->value();
4340

4441
if (! Config::has($key)) {
4542
return Response::error("Config key '{$key}' not found.");

0 commit comments

Comments
 (0)