Skip to content

Commit 0dfcdee

Browse files
authored
fix: report correct number of projects (#523)
1 parent da2cac8 commit 0dfcdee

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/tools/atlas/read/listProjects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class ListProjectsTool extends AtlasToolBase {
5555
----------------| ----------------| ----------------| ----------------| ----------------
5656
${rows}`;
5757
return {
58-
content: formatUntrustedData(`Found ${rows.length} projects`, formattedProjects),
58+
content: formatUntrustedData(`Found ${data.results.length} projects`, formattedProjects),
5959
};
6060
}
6161
}

tests/integration/tools/atlas/projects.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ describeWithAtlas("projects", (integration) => {
6161
const response = await integration.mcpClient().callTool({ name: "atlas-list-projects", arguments: {} });
6262
const elements = getResponseElements(response);
6363
expect(elements).toHaveLength(2);
64-
expect(elements[0]?.text).toMatch(/Found \d+ projects/);
6564
expect(elements[1]?.text).toContain("<untrusted-user-data-");
6665
expect(elements[1]?.text).toContain(projName);
6766
const data = parseTable(getDataFromUntrustedContent(elements[1]?.text ?? ""));
@@ -73,6 +72,8 @@ describeWithAtlas("projects", (integration) => {
7372
}
7473
}
7574
expect(found).toBe(true);
75+
76+
expect(elements[0]?.text).toBe(`Found ${data.length} projects`);
7677
});
7778
});
7879
});

0 commit comments

Comments
 (0)