mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2025-08-23 14:23:05 +00:00
Update
This commit is contained in:
@@ -2,6 +2,7 @@ package to
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"gitea.com/gitea/gitea-mcp/pkg/log"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
@@ -10,7 +11,7 @@ import (
|
||||
func TextResult(v any) (*mcp.CallToolResult, error) {
|
||||
result, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
return mcp.NewToolResultError("marshal result error"), err
|
||||
return nil, fmt.Errorf("marshal result err: %v", err)
|
||||
}
|
||||
log.Debugf("Text Result: %s", string(result))
|
||||
return mcp.NewToolResultText(string(result)), nil
|
||||
|
Reference in New Issue
Block a user