@@ -572,13 +572,10 @@ s.AddPrompt(mcp.NewPrompt("greeting",
572
572
return mcp.NewGetPromptResult (
573
573
" A friendly greeting" ,
574
574
[]mcp.PromptMessage {
575
- {
576
- Role: mcp.RoleAssistant ,
577
- Content: mcp.TextContent {
578
- Type: " text" ,
579
- Text: fmt.Sprintf (" Hello, %s ! How can I help you today?" , name),
580
- },
581
- },
575
+ mcp.NewPromptMessage (
576
+ mcp.RoleAssistant ,
577
+ mcp.NewTextContent (fmt.Sprintf (" Hello, %s ! How can I help you today?" , name)),
578
+ ),
582
579
},
583
580
), nil
584
581
})
@@ -599,23 +596,17 @@ s.AddPrompt(mcp.NewPrompt("code_review",
599
596
return mcp.NewGetPromptResult (
600
597
" Code review assistance" ,
601
598
[]mcp.PromptMessage {
602
- {
603
- Role: mcp.RoleSystem ,
604
- Content: mcp.TextContent {
605
- Type: " text" ,
606
- Text: " You are a helpful code reviewer. Review the changes and provide constructive feedback." ,
607
- },
608
- },
609
- {
610
- Role: mcp.RoleAssistant ,
611
- Content: mcp.EmbeddedResource {
612
- Type: " resource" ,
613
- Resource: mcp.ResourceContents {
614
- URI: fmt.Sprintf (" git://pulls/%s /diff" , prNumber),
615
- MIMEType: " text/x-diff" ,
616
- },
617
- },
618
- },
599
+ mcp.NewPromptMessage (
600
+ mcp.RoleSystem ,
601
+ mcp.NewTextContent (" You are a helpful code reviewer. Review the changes and provide constructive feedback." ),
602
+ ),
603
+ mcp.NewPromptMessage (
604
+ mcp.RoleAssistant ,
605
+ mcp.NewEmbeddedResource (mcp.ResourceContents {
606
+ URI: fmt.Sprintf (" git://pulls/%s /diff" , prNumber),
607
+ MIMEType: " text/x-diff" ,
608
+ }),
609
+ ),
619
610
},
620
611
), nil
621
612
})
@@ -636,23 +627,17 @@ s.AddPrompt(mcp.NewPrompt("query_builder",
636
627
return mcp.NewGetPromptResult (
637
628
" SQL query builder assistance" ,
638
629
[]mcp.PromptMessage {
639
- {
640
- Role: mcp.RoleSystem ,
641
- Content: mcp.TextContent {
642
- Type: " text" ,
643
- Text: " You are a SQL expert. Help construct efficient and safe queries." ,
644
- },
645
- },
646
- {
647
- Role: mcp.RoleAssistant ,
648
- Content: mcp.EmbeddedResource {
649
- Type: " resource" ,
650
- Resource: mcp.ResourceContents {
651
- URI: fmt.Sprintf (" db://schema/%s " , tableName),
652
- MIMEType: " application/json" ,
653
- },
654
- },
655
- },
630
+ mcp.NewPromptMessage (
631
+ mcp.RoleSystem ,
632
+ mcp.NewTextContent (" You are a SQL expert. Help construct efficient and safe queries." ),
633
+ ),
634
+ mcp.NewPromptMessage (
635
+ mcp.RoleAssistant ,
636
+ mcp.NewEmbeddedResource (mcp.ResourceContents {
637
+ URI: fmt.Sprintf (" db://schema/%s " , tableName),
638
+ MIMEType: " application/json" ,
639
+ }),
640
+ ),
656
641
},
657
642
), nil
658
643
})
0 commit comments