Files
hado/core/app/Mcp/Tools/GetProfile.php

21 lines
646 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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()));
}
}