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 29d873b commit e3bd9ceCopy full SHA for e3bd9ce
.gitignore
@@ -4,3 +4,4 @@
4
5
composer.lock
6
vendor
7
+/.idea
demo/src/MCP/Tools/CurrentTimeTool.php
@@ -11,8 +11,6 @@
11
12
namespace App\MCP\Tools;
13
14
-use DateTime;
15
-use DateTimeZone;
16
use Symfony\AI\McpSdk\Capability\Tool\MetadataInterface;
17
use Symfony\AI\McpSdk\Capability\Tool\ToolCall;
18
use Symfony\AI\McpSdk\Capability\Tool\ToolCallResult;
@@ -25,7 +23,7 @@ public function call(ToolCall $input): ToolCallResult
25
23
$format = $input->arguments['format'] ?? 'Y-m-d H:i:s';
26
24
27
return new ToolCallResult(
28
- (new DateTime('now', new DateTimeZone('UTC')))->format($format)
+ (new \DateTime('now', new \DateTimeZone('UTC')))->format($format)
29
);
30
}
31
0 commit comments