[McpServerTool,Description("send a HTTP GET request.")]
[McpServerTool,Description("Send an HTTP GET request to the specified URL and return the response. Provides status code, response body, headers, content length, elapsed time, final URI after redirects, and error info. Use this for fetching web pages, REST APIs, or any HTTP resource.")]
publicasyncTask<HttpResponse>HttpGet(
[Description("request url")]stringurl,
[Description("request headers(JSON format, like '{\"Content-Type\":\"application/json\"}').")]stringheaders="{\"Content-Type\":\"application/json\"}s",
[Description("timeout(ms)")]inttimeout=15000)
[Description("Target request URL (must include scheme, e.g. https://example.com/api/resource)")]stringurl,
[Description("Request headers as a JSON object string, e.g. {\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer xxx\"}")]stringheaders="{\"Content-Type\":\"application/json\"}",
[Description("Request timeout in milliseconds (default 15000 = 15s)")]inttimeout=15000)
{
if(string.IsNullOrEmpty(url))
{
@@ -51,40 +53,84 @@ public class NetworkTools(IRestClient client)