Add debug mode and upgrade mcp-go to v0.14.1

This commit is contained in:
hiifong
2025-03-20 23:01:05 +08:00
parent 18cb96fc80
commit 72d9b5a8dd
11 changed files with 60 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ package to
import (
"encoding/json"
"gitea.com/gitea/gitea-mcp/pkg/log"
"github.com/mark3labs/mcp-go/mcp"
)
@@ -11,5 +12,6 @@ func TextResult(v any) (*mcp.CallToolResult, error) {
if err != nil {
return mcp.NewToolResultError("marshal result error"), err
}
log.Debugf("Text Result: %s", string(result))
return mcp.NewToolResultText(string(result)), nil
}