feat: MCP profile tools; ProfileUpdater/ProfilePresenter shared with /me; docs and Caddy snippet for /mcp
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BCrwHHnGCB5XH968Nxokqw
This commit is contained in:
20
core/app/Mcp/Tools/GetProfile.php
Normal file
20
core/app/Mcp/Tools/GetProfile.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mcp\Tools;
|
||||
|
||||
use App\Presenters\ProfilePresenter;
|
||||
use Laravel\Mcp\ResponseFactory;
|
||||
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
|
||||
|
||||
#[IsReadOnly]
|
||||
class GetProfile extends AgentTool
|
||||
{
|
||||
protected string $name = 'get_profile';
|
||||
|
||||
protected string $description = 'Профиль пользователя: логин, часовой пояс, тихие часы (quiet_start–quiet_end, через полночь) и бейдж — сколько событий в today и overdue.';
|
||||
|
||||
public function handle(): ResponseFactory
|
||||
{
|
||||
return $this->respond(ProfilePresenter::present($this->user()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user