list_organization_projects
Retrieve all projects within a Sentry organization to view and manage error tracking across development initiatives.
Instructions
List all projects for the configured Sentry organization
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:202-230 (handler)Handler for 'list_organization_projects' tool: fetches projects from Sentry API endpoint '/projects/' using axios, returns pretty-printed JSON on success, or error message on failure.case 'list_organization_projects': { try { // Call Sentry API to get project list const response = await this.axiosInstance.get('projects/'); // On success, return project list data as JSON string return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { let errorMessage = 'Failed to list Sentry projects.'; if (axios.isAxiosError(error)) { errorMessage = `Sentry API error: ${error.response?.status} ${error.response?.statusText}. ${JSON.stringify(error.response?.data)}`; console.error("Sentry API Error Details:", error.response?.data); } else if (error instanceof Error) { errorMessage = error.message; } console.error("Error listing Sentry projects:", error); // On failure, return error message return { content: [ { type: 'text', text: errorMessage } ], isError: true, }; } break; // End case
- src/index.ts:130-138 (registration)Registration of 'list_organization_projects' tool in ListToolsRequestSchema handler, including name, description, and empty input schema (no parameters required).{ name: 'list_organization_projects', description: 'List all projects for the configured Sentry organization', inputSchema: { // No input parameters type: 'object', properties: {}, required: [], }, },