diff --git a/src/tools/atlas/read/listProjects.ts b/src/tools/atlas/read/listProjects.ts index 720186ecf..d5d3931b0 100644 --- a/src/tools/atlas/read/listProjects.ts +++ b/src/tools/atlas/read/listProjects.ts @@ -55,7 +55,7 @@ export class ListProjectsTool extends AtlasToolBase { ----------------| ----------------| ----------------| ----------------| ---------------- ${rows}`; return { - content: formatUntrustedData(`Found ${rows.length} projects`, formattedProjects), + content: formatUntrustedData(`Found ${data.results.length} projects`, formattedProjects), }; } } diff --git a/tests/integration/tools/atlas/projects.test.ts b/tests/integration/tools/atlas/projects.test.ts index 631b00f87..de637a23a 100644 --- a/tests/integration/tools/atlas/projects.test.ts +++ b/tests/integration/tools/atlas/projects.test.ts @@ -61,7 +61,6 @@ describeWithAtlas("projects", (integration) => { const response = await integration.mcpClient().callTool({ name: "atlas-list-projects", arguments: {} }); const elements = getResponseElements(response); expect(elements).toHaveLength(2); - expect(elements[0]?.text).toMatch(/Found \d+ projects/); expect(elements[1]?.text).toContain(" { } } expect(found).toBe(true); + + expect(elements[0]?.text).toBe(`Found ${data.length} projects`); }); }); });