network/curl
Make one HTTP(S) request to fetch or change a remote endpoint and get status, headers, and body; supports POST, PUT, DELETE, redirects, timeouts, and size limits.
Instructions
Makes one HTTP(S) request with Go's HTTP client and returns status, headers and body. NOT read-only: any method (default GET) is sent as given, so POST, PUT or DELETE change the remote system. Follows redirects (up to 10); a non-2xx status is not an error, check status_code. The default timeout is 10 s (timeout, whole seconds) and the 30 s worker limit caps anything larger. The body is cut at max_body (default 1 MiB, max 10 MiB) and truncated is then true. insecure skips TLS verification. The daemon's proxy environment is honored unless the user has a network: policy in mcp-sudo.yaml; such a policy applies to every call and redirect hop, and a blocked destination fails to connect. Header and body values are redacted in the audit log. Returns JSON with status_code, status, headers (values comma-joined), body, truncated; output_format is ignored. For DNS use network/nslookup, for TCP reachability network/ping, for local files files/read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Full URL including scheme, e.g. https://example.com/api | |
| body | No | Request body | |
| method | No | HTTP method, default GET; any method is sent as given | |
| headers | No | Request headers, e.g. {"Content-Type": "application/json"} | |
| timeout | No | Whole seconds (default 10; the 30 s worker limit caps it) | |
| insecure | No | Skip TLS certificate verification | |
| max_body | No | Return at most this many bytes of the response body (default 1048576 = 1 MiB, max 10 MiB); a cut body has truncated: true |