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:
nikita.hohlov
2026-09-05 06:14:31 -03:00
parent ed45a1d516
commit 8ee8a30fb5
12 changed files with 220 additions and 50 deletions

View 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_startquiet_end, через полночь) и бейдж — сколько событий в today и overdue.';
public function handle(): ResponseFactory
{
return $this->respond(ProfilePresenter::present($this->user()));
}
}