We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2f22eb commit 85c9909Copy full SHA for 85c9909
src/Tool/Console.php
@@ -0,0 +1,25 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
5
+namespace Dazz\PhpMcpTools\Tool;
6
7
+use PhpLlm\LlmChain\Chain\Toolbox\Attribute\AsTool;
8
9
+#[AsTool(name: 'console_exists', description: 'Check if the executable is available in the project', method: 'exists')]
10
+final readonly class Console
11
+{
12
+ public function __construct(private string $consoleExecutable)
13
+ {
14
+ }
15
16
+ public function exists(): string
17
18
+ return $this->isExecutableExisting() ? 'executable exists' : 'executable not found';
19
20
21
+ private function isExecutableExisting(): bool
22
23
+ return file_exists($this->consoleExecutable);
24
25
+}
0 commit comments