This repository was archived by the owner on Nov 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
DependencyInjection/CompilerPass Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public function process(ContainerBuilder $container): void
9797
9898 $ inputSchemaClassName = $ invokeMethodParameter ?->getType()?->getName(); // @phpstan-ignore method.notFound
9999 $ inputSchema = $ invokeMethodParameter === null
100- ? []
100+ ? null
101101 : $ schemaExtractor ->extract ($ inputSchemaClassName );
102102
103103 $ definition ->addTag (name: 'mcp_server.tool ' , attributes: [
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public function getToolsDefinitions(): array
6565 public function addToolDefinition (
6666 string $ name ,
6767 string $ description ,
68- array $ inputSchema ,
68+ ? array $ inputSchema ,
6969 ?string $ inputSchemaClass ,
7070 array $ annotations ,
7171 ): void {
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class ToolDefinition
2828 public function __construct (
2929 public string $ name ,
3030 public string $ description ,
31- public array $ inputSchema ,
31+ public ? array $ inputSchema ,
3232 #[Ignore]
3333 public ?string $ inputSchemaClass ,
3434 public array $ annotations ,
Original file line number Diff line number Diff line change @@ -151,8 +151,7 @@ public function testToolList(): void
151151 'openWorldHint ' => false ,
152152 ], $ tools [0 ]['annotations ' ]);
153153
154- $ this ->assertArrayHasKey ('inputSchema ' , $ tools [1 ]);
155- $ this ->assertSame ([], $ tools [1 ]['inputSchema ' ]);
154+ $ this ->assertArrayNotHasKey ('inputSchema ' , $ tools [1 ]);
156155
157156 $ this ->assertArrayHasKey ('inputSchema ' , $ tools [2 ]);
158157 $ this ->assertSame ([
You can’t perform that action at this time.
0 commit comments