Skip to content

Commit 5fa9116

Browse files
committed
update README
1 parent 07fac89 commit 5fa9116

File tree

1 file changed

+26
-41
lines changed

1 file changed

+26
-41
lines changed

README.md

Lines changed: 26 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -572,13 +572,10 @@ s.AddPrompt(mcp.NewPrompt("greeting",
572572
return mcp.NewGetPromptResult(
573573
"A friendly greeting",
574574
[]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+
),
582579
},
583580
), nil
584581
})
@@ -599,23 +596,17 @@ s.AddPrompt(mcp.NewPrompt("code_review",
599596
return mcp.NewGetPromptResult(
600597
"Code review assistance",
601598
[]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+
),
619610
},
620611
), nil
621612
})
@@ -636,23 +627,17 @@ s.AddPrompt(mcp.NewPrompt("query_builder",
636627
return mcp.NewGetPromptResult(
637628
"SQL query builder assistance",
638629
[]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+
),
656641
},
657642
), nil
658643
})

0 commit comments

Comments
 (0)