install
This commit is contained in:
40
stubs/tool.stub
Normal file
40
stubs/tool.stub
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Illuminate\JsonSchema\JsonSchema;
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Tool;
|
||||
|
||||
class {{ class }} extends Tool
|
||||
{
|
||||
/**
|
||||
* The tool's description.
|
||||
*/
|
||||
protected string $description = <<<'MARKDOWN'
|
||||
A description of what this tool does.
|
||||
MARKDOWN;
|
||||
|
||||
/**
|
||||
* Handle the tool request.
|
||||
*/
|
||||
public function handle(Request $request): Response
|
||||
{
|
||||
//
|
||||
|
||||
return Response::text('The content generated by the tool.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tool's input schema.
|
||||
*
|
||||
* @return array<string, \Illuminate\JsonSchema\JsonSchema>
|
||||
*/
|
||||
public function schema(JsonSchema $schema): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user