list_atlas_projects
Retrieve all MongoDB Atlas projects accessible to your API key for project management and oversight.
Instructions
Lists all Atlas projects that the API key has access to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:242-260 (handler)The handler function that fetches and returns the list of Atlas projects from the MongoDB Atlas API endpoint '/groups'.
private async listAtlasProjects() { try { const url = 'https://cloud.mongodb.com/api/atlas/v1.0/groups'; const result = await this.makeAtlasRequest(url, 'GET'); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { return { content: [{ type: 'text', text: error.message }], isError: true }; } - src/index.ts:478-485 (registration)Tool registration in the ListTools response, including name, description, and empty input schema (no parameters required).
{ name: 'list_atlas_projects', description: 'Lists all Atlas projects that the API key has access to.', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:481-484 (schema)Input schema definition: empty object since the tool takes no parameters.
inputSchema: { type: 'object', properties: {}, }, - src/index.ts:561-563 (handler)Dispatch case in the central CallToolRequest handler that invokes the listAtlasProjects method.
case 'list_atlas_projects': result = await this.listAtlasProjects(); break;