fix helm README

This commit is contained in:
johnlanni
2025-04-01 23:05:08 +08:00
parent 3c73976130
commit e6d32aa1cf
13 changed files with 13 additions and 376 deletions

View File

@@ -61,32 +61,6 @@ func (t SearchDetailRequest) Call(ctx server.HttpContext, s server.Server) error
utils.OnMCPToolCallError(ctx, fmt.Errorf("search detail call failed, status: %d", statusCode))
return
}
var response struct {
Status string `json:"status"`
Info string `json:"info"`
Pois []struct {
ID string `json:"id"`
Name string `json:"name"`
Location string `json:"location"`
Address string `json:"address"`
BusinessArea string `json:"business_area"`
Cityname string `json:"cityname"`
Type string `json:"type"`
Alias string `json:"alias"`
BizExt map[string]string `json:"biz_ext"`
} `json:"pois"`
}
err := json.Unmarshal(responseBody, &response)
if err != nil {
utils.OnMCPToolCallError(ctx, fmt.Errorf("failed to parse search detail response: %v", err))
return
}
if response.Status != "1" {
utils.OnMCPToolCallError(ctx, fmt.Errorf("search detail failed: %s", response.Info))
return
}
poi := response.Pois[0]
result, _ := json.MarshalIndent(poi, "", " ")
utils.SendMCPToolTextResult(ctx, string(result))
utils.SendMCPToolTextResult(ctx, string(responseBody))
})
}