- Create TryPostServer MCP server with 17 tools: Post (List, Get, Create, Delete), Hashtag (List, Create, Update, Delete), Label (List, Create, Update, Delete), Workspace (Get), ApiKey (List, Create, Delete) - Create AuthenticateMcpToken middleware (logs in workspace owner) - Register mcp.auth middleware alias in bootstrap/app.php - Create routes/ai.php with mcp.trypost.test subdomain - Add PostApiTest with 6 tests (list, show, create, delete, isolation) - Fix PostApiTest assertions for pagination/resource wrapping - 704 tests passing, frontend build passing
37 lines
710 B
Text
37 lines
710 B
Text
<?php
|
|
|
|
namespace {{ namespace }};
|
|
|
|
use Illuminate\Contracts\JsonSchema\JsonSchema;
|
|
use Laravel\Ai\Contracts\Tool;
|
|
use Laravel\Ai\Tools\Request;
|
|
use Stringable;
|
|
|
|
class {{ class }} implements Tool
|
|
{
|
|
/**
|
|
* Get the description of the tool's purpose.
|
|
*/
|
|
public function description(): Stringable|string
|
|
{
|
|
return 'A description of the tool.';
|
|
}
|
|
|
|
/**
|
|
* Execute the tool.
|
|
*/
|
|
public function handle(Request $request): Stringable|string
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Get the tool's schema definition.
|
|
*/
|
|
public function schema(JsonSchema $schema): array
|
|
{
|
|
return [
|
|
'value' => $schema->string()->required(),
|
|
];
|
|
}
|
|
}
|