Zoro-147 commited on
Commit
6910432
·
verified ·
1 Parent(s): 15c494f

added mcp prompts

Browse files
Files changed (1) hide show
  1. server.py +39 -0
server.py CHANGED
@@ -113,5 +113,44 @@ async def suggest_template(changes_summary: str, change_type: str) -> str:
113
  return json.dumps({"error": f"No suitable template found for change type '{change_type}'. Available templates: {list(templates.keys())}"})
114
 
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  if __name__ == "__main__":
117
  mcp.run()
 
113
  return json.dumps({"error": f"No suitable template found for change type '{change_type}'. Available templates: {list(templates.keys())}"})
114
 
115
 
116
+ @mcp.prompt()
117
+ def format_ci_failure_alert() -> str:
118
+ """Create a Slack alert for CI/CD failures."""
119
+ return """Format this GitHub Actions failure as a Slack message:
120
+
121
+ Use this template:
122
+ :rotating_light: *CI Failure Alert* :rotating_light:
123
+
124
+ A CI workflow has failed:
125
+ *Workflow*: workflow_name
126
+ *Branch*: branch_name
127
+ *Status*: Failed
128
+ *View Details*: <LOGS_LINK|View Logs>
129
+
130
+ Please check the logs and address any issues.
131
+
132
+ Use Slack markdown formatting and keep it concise for quick team scanning."""
133
+
134
+
135
+ @mcp.prompt()
136
+ def format_ci_success_summary() -> str:
137
+ """Create a Slack message celebrating successful deployments."""
138
+ return """Format this successful GitHub Actions run as a Slack message:
139
+
140
+ Use this template:
141
+ :white_check_mark: *Deployment Successful* :white_check_mark:
142
+
143
+ Deployment completed successfully for [Repository Name]
144
+
145
+ *Changes:*
146
+ - Key feature or fix 1
147
+ - Key feature or fix 2
148
+
149
+ *Links:*
150
+ <PR_LINK|View Changes>
151
+
152
+ Keep it celebratory but informative. Use Slack markdown formatting."""
153
+
154
+
155
  if __name__ == "__main__":
156
  mcp.run()