An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
<?php
namespace App\Mcp\Concerns;
/**
* Hides tools and actions that the current token cannot use, so read-only
* connections never see write tools and agents do not try calls that must fail.
*/
trait ChecksTokenAbilities
{
protected function currentTokenCan(string $ability): bool
{
$token = request()->user()?->currentAccessToken();
return $token !== null && ($token->can('root') || $token->can($ability));
}
}