list_teams
Retrieve all teams within your Glitchtip organization to manage team access, permissions, and project assignments for error tracking and monitoring.
Instructions
List all teams in the organization
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:571-615 (handler)The handler function for the 'list_teams' tool. It makes a GET request to the Glitchtip API endpoint for the organization's teams, handles errors, and returns the JSON response as text content.async listTeams() { const url = `${this.apiEndpoint}/api/0/organizations/${this.organizationSlug}/teams/`; try { const response = await fetch(url, { method: 'GET', headers: { 'Authorization': `Bearer ${this.apiToken}`, 'Accept': 'application/json' } }); if (!response.ok) { const errorText = await response.text(); return { content: [ { type: "text", text: `Error fetching teams: ${response.status} ${response.statusText}\n${errorText}` } ] }; } const data = await response.json(); return { content: [ { type: "text", text: JSON.stringify(data, null, 2) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error: ${error.message}` } ] }; } }
- src/index.js:136-153 (registration)The request handler switch statement that dispatches 'list_teams' calls to the listTeams() method.switch (name) { case "get_issue": return await this.getIssue(args); case "list_issues": return await this.listIssues(args); case "list_events": return await this.listEvents(args); case "list_projects": return await this.listProjects(); case "get_project": return await this.getProject(args); case "get_organization": return await this.getOrganization(); case "list_teams": return await this.listTeams(); default: throw new Error(`Unknown tool: ${name}`); }
- src/index.js:119-126 (schema)Tool registration including name, description, and input schema (no required parameters). This is part of the tools list provided to the MCP server.{ name: "list_teams", description: "List all teams in the organization", inputSchema: { type: "object", properties: {} } }