Skip to content

Commit bfa1a77

Browse files
committed
fix: replace json schema with factory instance
1 parent 4305409 commit bfa1a77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mcp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ class CurrentWeatherTool extends Tool
201201
/**
202202
* Get the tool's input schema.
203203
*
204-
* @return array<string, \Illuminate\JsonSchema\JsonSchema>
204+
* @return array<string, JsonSchema>
205205
*/
206206
public function schema(JsonSchema $schema): array
207207
{
208208
return [
209-
'location' => $schema::string()
209+
'location' => $schema->string()
210210
->description('The location to get the weather for.')
211211
->required(),
212212
];
@@ -303,16 +303,16 @@ class CurrentWeatherTool extends Tool
303303
/**
304304
* Get the tool's input schema.
305305
*
306-
* @return array<string, JsonSchema>
306+
* @return array<string, \Illuminate\JsonSchema\JsonSchema>
307307
*/
308308
public function schema(JsonSchema $schema): array
309309
{
310310
return [
311-
'location' => $schema::string()
311+
'location' => $schema->string()
312312
->description('The location to get the weather for.')
313313
->required(),
314314

315-
'units' => $schema::array()
315+
'units' => $schema->array()
316316
->enum(['celsius', 'fahrenheit'])
317317
->description('The temperature units to use.')
318318
->default('celsius'),

0 commit comments

Comments
 (0)