Skip to content

Commit 0cf7f87

Browse files
authored
[12.x] MCP Tool Schema docs (#10824)
* fix: json schema creation * fix: replace json schema with factory instance
1 parent 053cbc7 commit 0cf7f87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mcp.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ class CurrentWeatherTool extends Tool
312312
->description('The location to get the weather for.')
313313
->required(),
314314

315-
'units' => $schema->enum(['celsius', 'fahrenheit'])
315+
'units' => $schema->array()
316+
->enum(['celsius', 'fahrenheit'])
316317
->description('The temperature units to use.')
317318
->default('celsius'),
318319
];

0 commit comments

Comments
 (0)