Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0dfcdee

Browse files
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)

AltStyle によって変換されたページ (->オリジナル) /