Update main.go
Browse files
main.go
CHANGED
@@ -16,6 +16,7 @@ import (
|
|
16 |
|
17 |
func webSearchHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
18 |
query := request.Params.Arguments["query"].(string)
|
|
|
19 |
client := &http.Client{}
|
20 |
|
21 |
//https://www.baidu.com/s?wd=ssstn=json&rn=10
|
@@ -37,7 +38,7 @@ func webSearchHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.Ca
|
|
37 |
return nil, err
|
38 |
}
|
39 |
defer resp.Body.Close()
|
40 |
-
|
41 |
type Entry struct {
|
42 |
Title string
|
43 |
Url string
|
|
|
16 |
|
17 |
func webSearchHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
18 |
query := request.Params.Arguments["query"].(string)
|
19 |
+
fmt.Println("query:", query)
|
20 |
client := &http.Client{}
|
21 |
|
22 |
//https://www.baidu.com/s?wd=ssstn=json&rn=10
|
|
|
38 |
return nil, err
|
39 |
}
|
40 |
defer resp.Body.Close()
|
41 |
+
fmt.Println("resp.StatusCode:", resp.StatusCode)
|
42 |
type Entry struct {
|
43 |
Title string
|
44 |
Url string
|