koalr-mcp 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +2 -1
- package/dist/tools/ai-adoption.js +10 -2
- package/dist/tools/organization.js +11 -3
- package/dist/tools/pull-requests.js +8 -1
- package/dist/tools/search.js +1 -1
- package/dist/tools/teams.js +10 -2
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -22,6 +22,7 @@ Koalr tracks pull requests, DORA metrics, deploy risk, test coverage, incidents,
|
|
|
22
22
|
- **Stale/blocked work**: get_at_risk_prs then get_open_prs for detail
|
|
23
23
|
- **Team or repo drill-down**: list_teams → get_team, or list_repositories → get_repository
|
|
24
24
|
- **Individual developer**: get_developer (requires GitHub login) or list_top_contributors
|
|
25
|
+
- **Search by name**: search_koalr to find developers, repos, PRs, or teams by name
|
|
25
26
|
- **Incidents**: list_recent_incidents returns MTTR and impact
|
|
26
27
|
- **Coverage**: get_coverage_summary by repository
|
|
27
28
|
- **AI tool usage**: get_ai_adoption_summary or get_ai_adoption_trend
|
|
@@ -36,7 +37,7 @@ score_pr_for_deploy_risk returns 0–100. 0–39 = low, 40–69 = medium, 70–8
|
|
|
36
37
|
export function createServer(apiKey) {
|
|
37
38
|
const server = new McpServer({
|
|
38
39
|
name: 'koalr',
|
|
39
|
-
version: '0.4.
|
|
40
|
+
version: '0.4.5',
|
|
40
41
|
}, {
|
|
41
42
|
instructions: SYSTEM_PROMPT,
|
|
42
43
|
});
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
2
|
import { apiGet, formatResult } from '../client.js';
|
|
3
3
|
export function registerAiAdoptionTools(server, apiKey) {
|
|
4
|
-
server.tool('get_ai_adoption_summary', 'Get AI coding tool adoption metrics including GitHub Copilot acceptance rate, Cursor active users, AI-generated code percentage, and suggestions per developer. Use this to understand how the team is using AI coding assistants.', {
|
|
5
|
-
|
|
4
|
+
server.tool('get_ai_adoption_summary', 'Get AI coding tool adoption metrics including GitHub Copilot acceptance rate, Cursor active users, AI-generated code percentage, and suggestions per developer. Use this to understand how the team is using AI coding assistants.', {
|
|
5
|
+
teamId: z
|
|
6
|
+
.string()
|
|
7
|
+
.optional()
|
|
8
|
+
.describe('Team ID to filter AI adoption metrics to a specific team. Omit for org-wide summary.'),
|
|
9
|
+
}, { readOnlyHint: true }, async ({ teamId }) => {
|
|
10
|
+
const params = {};
|
|
11
|
+
if (teamId)
|
|
12
|
+
params['teamId'] = teamId;
|
|
13
|
+
const data = await apiGet('/api/v1/copilot', params, apiKey);
|
|
6
14
|
return { content: [{ type: 'text', text: formatResult(data) }] };
|
|
7
15
|
});
|
|
8
16
|
server.tool('get_ai_adoption_trend', 'Get the trend of AI tool adoption over time showing weekly active users, acceptance rates, and code attribution percentages. Use this to track whether AI tool adoption is growing or declining.', {
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
2
|
import { apiGet, formatResult } from '../client.js';
|
|
3
3
|
export function registerOrganizationTools(server, apiKey) {
|
|
4
|
-
server.tool('get_org_health', 'Get a comprehensive organization health snapshot: DORA performance tier (Elite/High/Medium/Low), cycle time percentile vs industry benchmarks, test coverage percentage, number of active teams, and incident rate. Use this as the first tool to get a high-level picture of engineering health.', {
|
|
4
|
+
server.tool('get_org_health', 'Get a comprehensive organization health snapshot: DORA performance tier (Elite/High/Medium/Low), cycle time percentile vs industry benchmarks, test coverage percentage, number of active teams, and incident rate. Use this as the first tool to get a high-level picture of engineering health.', {
|
|
5
|
+
teamId: z
|
|
6
|
+
.string()
|
|
7
|
+
.optional()
|
|
8
|
+
.describe('Team ID to scope health metrics to a specific team. Omit for org-wide snapshot.'),
|
|
9
|
+
}, { readOnlyHint: true }, async ({ teamId }) => {
|
|
10
|
+
const params = {};
|
|
11
|
+
if (teamId)
|
|
12
|
+
params['teamId'] = teamId;
|
|
5
13
|
const [doraData, flowData, teamsData] = await Promise.all([
|
|
6
|
-
apiGet('/api/v1/metrics/dora',
|
|
7
|
-
apiGet('/api/v1/flow',
|
|
14
|
+
apiGet('/api/v1/metrics/dora', params, apiKey),
|
|
15
|
+
apiGet('/api/v1/flow', params, apiKey),
|
|
8
16
|
apiGet('/api/v1/teams', undefined, apiKey),
|
|
9
17
|
]);
|
|
10
18
|
const result = {
|
|
@@ -30,11 +30,18 @@ export function registerPullRequestTools(server, apiKey) {
|
|
|
30
30
|
const data = await apiGet('/api/v1/pull-requests', params, apiKey);
|
|
31
31
|
return { content: [{ type: 'text', text: formatResult(data) }] };
|
|
32
32
|
});
|
|
33
|
-
server.tool('get_at_risk_prs', 'Get pull requests at risk of becoming long-running or blocked. These are PRs that have been open for more than 3 days, have no reviews, or are very large. Use this to prompt engineering leads to take action on blocked work.', {
|
|
33
|
+
server.tool('get_at_risk_prs', 'Get pull requests at risk of becoming long-running or blocked. These are PRs that have been open for more than 3 days, have no reviews, or are very large. Use this to prompt engineering leads to take action on blocked work.', {
|
|
34
|
+
repositoryId: z
|
|
35
|
+
.string()
|
|
36
|
+
.optional()
|
|
37
|
+
.describe('Filter to a specific repository by ID. Omit to return at-risk PRs across all repos.'),
|
|
38
|
+
}, { readOnlyHint: true }, async ({ repositoryId }) => {
|
|
34
39
|
const params = {
|
|
35
40
|
state: 'open',
|
|
36
41
|
highRiskOnly: 'true',
|
|
37
42
|
};
|
|
43
|
+
if (repositoryId)
|
|
44
|
+
params['repositoryId'] = repositoryId;
|
|
38
45
|
const data = await apiGet('/api/v1/pull-requests', params, apiKey);
|
|
39
46
|
return { content: [{ type: 'text', text: formatResult(data) }] };
|
|
40
47
|
});
|
package/dist/tools/search.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
2
|
import { apiGet, formatResult } from '../client.js';
|
|
3
3
|
export function registerSearchTools(server, apiKey) {
|
|
4
|
-
server.tool('
|
|
4
|
+
server.tool('search_koalr', 'Search across all Koalr entities: developers (by name or GitHub login), repositories (by name), pull requests (by title or branch), and teams (by name). Use this when you need to find an entity before using a more specific tool.', {
|
|
5
5
|
query: z.string().describe('Search query text (e.g. "payments", "alice", "auth-service")'),
|
|
6
6
|
type: z
|
|
7
7
|
.enum(['developer', 'repository', 'pr', 'team'])
|
package/dist/tools/teams.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod/v3';
|
|
2
2
|
import { apiGet, formatResult } from '../client.js';
|
|
3
3
|
export function registerTeamTools(server, apiKey) {
|
|
4
|
-
server.tool('list_teams', 'List all engineering teams in the organization with their member counts and slugs. Use this to discover team IDs needed for filtering other metrics tools.', {
|
|
5
|
-
|
|
4
|
+
server.tool('list_teams', 'List all engineering teams in the organization with their member counts and slugs. Use this to discover team IDs needed for filtering other metrics tools.', {
|
|
5
|
+
search: z
|
|
6
|
+
.string()
|
|
7
|
+
.optional()
|
|
8
|
+
.describe('Filter teams by name substring (case-insensitive). Omit to list all teams.'),
|
|
9
|
+
}, { readOnlyHint: true }, async ({ search }) => {
|
|
10
|
+
const params = {};
|
|
11
|
+
if (search)
|
|
12
|
+
params['search'] = search;
|
|
13
|
+
const data = await apiGet('/api/v1/teams', params, apiKey);
|
|
6
14
|
return { content: [{ type: 'text', text: formatResult(data) }] };
|
|
7
15
|
});
|
|
8
16
|
server.tool('get_team', "Get details and metrics for a specific team including DORA performance, cycle time, and member count. Use this when asked about a specific team's engineering health.", {
|