Skip to content

Commit 7f10a9e

Browse files
authored
Merge pull request #14 from redhat-ai-tools/prompt
Replicate ROSA HCP Guidance prompt to a tool
2 parents a29017c + 1be8683 commit 7f10a9e

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

pkg/mcp/tools.go

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ func (s *Server) initTools() []server.ServerTool {
3636
), Handler: s.handleGetCluster},
3737

3838
{Tool: mcp.NewTool("create_rosa_hcp_cluster",
39-
mcp.WithDescription("Provision a new ROSA HCP cluster with required configuration"),
39+
mcp.WithDescription(`Provision a new ROSA HCP cluster with basic configuration.
40+
41+
Use the workflow from the get_rosa_hcp_prerequisites_guide tool or prompt to guide a user through completing the necessary pre-requisite steps and collecting the required configuration values.`),
4042
mcp.WithString("cluster_name", mcp.Description("Name for the cluster"), mcp.Required()),
4143
mcp.WithString("aws_account_id", mcp.Description("AWS account ID"), mcp.Required()),
4244
mcp.WithString("billing_account_id", mcp.Description("AWS billing account ID"), mcp.Required()),
@@ -54,6 +56,15 @@ func (s *Server) initTools() []server.ServerTool {
5456
mcp.WithDestructiveHintAnnotation(false),
5557
mcp.WithOpenWorldHintAnnotation(true),
5658
), Handler: s.handleCreateROSAHCPCluster},
59+
60+
{Tool: mcp.NewTool("get_rosa_hcp_prerequisites_guide",
61+
mcp.WithDescription(`Get the complete workflow prompt for ROSA HCP cluster installation prerequisites and setup.
62+
63+
Use this workflow to guide a user through the complete setup process for creating a ROSA HCP (Red Hat OpenShift Service on AWS with Hosted Control Planes) cluster. using the create_rosa_hcp_cluster tool.`),
64+
mcp.WithReadOnlyHintAnnotation(true),
65+
mcp.WithDestructiveHintAnnotation(false),
66+
mcp.WithOpenWorldHintAnnotation(true),
67+
), Handler: s.handleGetROSAHCPPrerequisitesGuide},
5768
}
5869
}
5970

@@ -67,7 +78,6 @@ func (s *Server) registerTools() {
6778
s.mcpServer.SetTools(tools...)
6879
}
6980

70-
7181
// handleWhoami handles the whoami tool
7282
func (s *Server) handleWhoami(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
7383
s.logToolCall("whoami", convertParamsToMap())
@@ -285,6 +295,14 @@ func (s *Server) handleCreateROSAHCPCluster(ctx context.Context, ctr mcp.CallToo
285295
return NewTextResult(formattedResponse, nil), nil
286296
}
287297

298+
// handleGetROSAHCPPrerequisitesGuide handles the get_rosa_hcp_prerequisites_guide tool
299+
func (s *Server) handleGetROSAHCPPrerequisitesGuide(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
300+
s.logToolCall("get_rosa_hcp_prerequisites_guide", convertParamsToMap())
301+
302+
// Return the embedded prerequisites guide content directly
303+
return NewTextResult(prereqsGuide, nil), nil
304+
}
305+
288306
// NewTextResult creates a new MCP CallToolResult
289307
func NewTextResult(content string, err error) *mcp.CallToolResult {
290308
if err != nil {

0 commit comments

Comments
 (0)