Skip to main content
Glama
UserService.php646 B
<?php declare(strict_types=1); namespace App\Service; use App\Model\User; use App\Repository\UserRepository; final class UserService { public function __construct( private readonly AuditLogger $logger, private readonly UserRepository $repository, ) { } public function findUser(int $id): ?User { if ($id <= 0) { $this->logger->warn('Invalid user id', ['id' => $id]); return null; } $user = $this->repository->find($id); if ($user === null) { $this->logger->info('User not found', ['id' => $id]); } return $user; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pi22by7/In-Memoria'

If you have feedback or need assistance with the MCP directory API, please join our Discord server