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:
@@ -36,4 +36,18 @@ class McpAuthTest extends TestCase
|
||||
->assertOk()
|
||||
->assertJsonPath('result.serverInfo.name', 'Hado');
|
||||
}
|
||||
|
||||
public function test_lists_all_tools_over_http(): void
|
||||
{
|
||||
$user = User::create(['login' => 'nikita', 'tz' => 'UTC']);
|
||||
AgentToken::create(['user_id' => $user->id, 'token_hash' => hash('sha256', 'secret')]);
|
||||
|
||||
$names = collect($this->postJson('/mcp', ['jsonrpc' => '2.0', 'id' => 2, 'method' => 'tools/list'], ['Authorization' => 'Bearer secret'])
|
||||
->assertOk()->json('result.tools'))->pluck('name')->all();
|
||||
|
||||
$this->assertSame([
|
||||
'list_events', 'get_event', 'create_event', 'update_event', 'delete_event',
|
||||
'mark_done', 'mark_ack', 'get_profile', 'update_profile',
|
||||
], $names);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user