File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,26 @@ class SearchTool extends Tool
285285}
286286```
287287
288+ You can use ` Tool::make($className) ` if you need to resolve the dependencies:
289+
290+
291+ ``` php
292+ use App\Tools\SearchTool;
293+ use Prism\Prism\Facades\Tool;
294+
295+ $tool = Tool::make(SearchTool::class);
296+ ```
297+
298+ ## Using Laravel MCP Tools
299+ You can use existing [ Laravel MCP] ( https://github.com/laravel/mcp ) Tools in Prism directly, without using the Laravel MCP Server:
300+
301+ ``` php
302+ use App\Mcp\Tools\CurrentWeatherTool;
303+ use Prism\Prism\Facades\Tool;
304+
305+ $tool = Tool::make(CurrentWeatherTool::class);
306+ ```
307+
288308## Tool Choice Options
289309
290310You can control how the AI uses tools with the ` withToolChoice ` method:
You can’t perform that action at this time.
0 commit comments