Skip to content

Conversation

nirinchev
Copy link
Collaborator

@nirinchev nirinchev commented Oct 20, 2025

Proposed changes

Reworks list-projects to return json instead of a table as LLMs have an easier time understanding json responses (our accuracy tests will occasionally fail because of that). Additionally, reworks the tests in projects.test.ts to be independent of one another.

@nirinchev nirinchev requested a review from a team as a code owner October 20, 2025 09:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reworks the list-projects Atlas tool to return JSON formatted responses instead of table format, making it easier for LLMs to understand. It also refactors the integration tests to be independent of each other by implementing proper test isolation and cleanup mechanisms.

Key Changes

  • Modified list-projects tool output from table format to structured JSON
  • Implemented proper test isolation with individual project creation and centralized cleanup
  • Removed shared argument object exports in favor of inline definitions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/tools/atlas/read/listProjects.ts Changed output format from table to JSON and inlined argument definitions
src/tools/atlas/create/createProject.ts Removed exported argument object in favor of inline definition
tests/integration/tools/atlas/projects.test.ts Reworked tests for independence with proper setup/cleanup and updated assertions for JSON format
});

it("should create a project", async () => {
const projName = `test-project-${new ObjectId().toString()}`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's keep the expected project name prefix as we have a cleanup script running testProj-

const formattedProjects = `Project Name | Project ID | Organization Name | Organization ID | Created At
----------------| ----------------| ----------------| ----------------| ----------------
${rows}`;
const serializedProjects = JSON.stringify(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the change! I have a draft to update all other tools but will wait for this one to get merged first

let projName: string;
let orgId: string;
beforeAll(async () => {
projName = `list-projects-test-${new ObjectId().toString()}`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
projName = `list-projects-test-${new ObjectId().toString()}`;
projName = `testProj-listProjects-${new ObjectId().toString()}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants