Ensure all tools fit on a single tools/list page

- 📜 Increased `defaultPaginationLength` to 100 to accommodate all tools on a single page.
-  Added feature test to confirm pagination settings align with client requirements.
This commit is contained in:
HolgerHatGarKeineNode
2026-06-08 10:54:18 +02:00
parent b6f05bca41
commit ab8b91a0af
2 changed files with 20 additions and 0 deletions
@@ -22,3 +22,13 @@ it('registers every domain tool on the server', function () {
->and($tools)->toContain(UpdateCourseEventTool::class)
->and($tools)->toContain(SearchCitiesTool::class);
});
it('serves every tool on a single tools/list page', function () {
$reflection = new ReflectionClass(EinundzwanzigServer::class);
$tools = $reflection->getProperty('tools')->getDefaultValue();
$defaultPerPage = $reflection->getProperty('defaultPaginationLength')->getDefaultValue();
// Some MCP clients (e.g. the Claude.ai web connector) only load the first
// tools/list page and do not follow the nextCursor, so every tool must fit on it.
expect($defaultPerPage)->toBeGreaterThanOrEqual(count($tools));
});