feat: add get issue by index

This commit is contained in:
hiifong
2025-03-16 16:33:15 +08:00
parent 82b02fa9f1
commit 59693ffc5d
4 changed files with 83 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ const (
var (
GetMyUserInfoTool = mcp.NewTool(
GetMyUserInfoToolName,
mcp.WithDescription("Get My User Info"),
mcp.WithDescription("Get my user info"),
)
)
@@ -28,7 +28,7 @@ func GetUserInfoFn(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallT
result, err := json.Marshal(user)
if err != nil {
return mcp.NewToolResultError("Get My User Info Error"), err
return mcp.NewToolResultError("marshal my user info error"), err
}
return mcp.NewToolResultText(string(result)), nil
}