koalr-mcp 0.4.0 → 0.4.2

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.
Files changed (2) hide show
  1. package/dist/server.js +42 -1
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -36,10 +36,51 @@ score_pr_for_deploy_risk returns 0–100. 0–39 = low, 40–69 = medium, 70–8
36
36
  export function createServer(apiKey) {
37
37
  const server = new McpServer({
38
38
  name: 'koalr',
39
- version: '0.3.2',
39
+ version: '0.4.1',
40
40
  }, {
41
41
  instructions: SYSTEM_PROMPT,
42
42
  });
43
+ // Register server-level prompts (MCP prompts capability)
44
+ server.prompt('koalr-quickstart', 'A prompt that gives your agent an overview of what the Koalr MCP server can do and example queries to get started.', () => ({
45
+ messages: [
46
+ {
47
+ role: 'user',
48
+ content: {
49
+ type: 'text',
50
+ text: `Use the Koalr MCP server to answer engineering performance questions. Here are good starting points:
51
+
52
+ 1. Run get_org_health for a full org snapshot (DORA tier, cycle time, incidents, team count).
53
+ 2. Run get_dora_summary for deployment frequency, lead time, change failure rate, and MTTR.
54
+ 3. Run get_at_risk_prs to find PRs that are stale, large, or have no reviewers.
55
+ 4. Run list_teams to discover team IDs, then get_team to drill into a specific team.
56
+ 5. Run score_pr_for_deploy_risk with a PR number and file list to assess merge risk.
57
+
58
+ All tools are read-only. Use from/to ISO date strings to control the time window. Use teamId or repositoryId to narrow results.`,
59
+ },
60
+ },
61
+ ],
62
+ }));
63
+ server.prompt('koalr-deploy-risk', 'A prompt that guides your agent through assessing the deployment risk of a pull request using Koalr.', () => ({
64
+ messages: [
65
+ {
66
+ role: 'user',
67
+ content: {
68
+ type: 'text',
69
+ text: `To assess deployment risk for a pull request, use score_pr_for_deploy_risk. You will need:
70
+ - owner: GitHub org or user (e.g. "acme")
71
+ - repo: repository name (e.g. "api-service")
72
+ - prNumber: the PR number
73
+ - sha: the head commit SHA
74
+ - title: PR title
75
+ - additions, deletions, changedFiles: size metrics
76
+ - files (optional but recommended): list of changed file paths
77
+
78
+ The tool returns a 0–100 risk score. Interpret as: 0–39 low, 40–69 medium, 70–89 high, 90–100 critical.
79
+ Scores ≥70 should be reviewed carefully before merging — check for DDL migrations, CODEOWNERS violations, and large blast radius.`,
80
+ },
81
+ },
82
+ ],
83
+ }));
43
84
  // Register all tool groups (apiKey is threaded through for hosted HTTP mode)
44
85
  registerDoraTools(server, apiKey);
45
86
  registerPullRequestTools(server, apiKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koalr-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Koalr MCP server — connect engineering metrics to AI agents",
5
5
  "type": "module",
6
6
  "license": "MIT",