feat: add mcp tool finished

This commit is contained in:
lilong.129
2025-05-26 09:05:48 +08:00
parent e60c362257
commit 36c5044402
4 changed files with 47 additions and 2 deletions
+1
View File
@@ -65,6 +65,7 @@ const (
ACTION_InstallApp ActionMethod = "install_app"
ACTION_UninstallApp ActionMethod = "uninstall_app"
ACTION_DownloadApp ActionMethod = "download_app"
ACTION_Finished ActionMethod = "finished"
)
const (
+4
View File
@@ -195,6 +195,10 @@ type AIActionRequest struct {
Prompt string `json:"prompt" binding:"required" desc:"AI action prompt"`
}
type FinishedRequest struct {
Content string `json:"content" binding:"required" desc:"Completion message for finished reason"`
}
// NewMCPOptions generates mcp.NewTool parameters from a struct type.
// It automatically generates mcp.NewTool parameters based on the struct fields and their desc tags.
func NewMCPOptions(t interface{}) (options []mcp.ToolOption) {