Skip to main content
Always-on core tools: HTTP tools (http_fetch, http_download) are now included in the core tool set and are always available to all agents. No enableHttp flag is needed.
Make HTTP requests and download files.
Response bodies are truncated at 100,000 bytes (MAX_RESPONSE_BYTES). Default request timeout is 30,000 ms.

http_fetch — HTTP Request

Send an HTTP request and return the response status, headers, and body.

Parameters

ParameterTypeRequiredDescription
urlstringyesURL to fetch
methodenum: GET | POST | PUT | DELETE | PATCH | HEAD | OPTIONSnoHTTP method (default GET)
headersRecord<string, string>noRequest headers
bodystringnoRequest body
timeoutnumbernoRequest timeout in milliseconds (default 30000)

Returns

Object with status (number), selected response headers, and body (string). Body is truncated at 100 KB. Only a curated subset of response headers is returned. Binary responses return a summary instead of raw content.

Notes

  • Only selected response headers are included in the result (e.g. content-type, location)
  • Binary content types return a descriptive summary rather than the raw bytes
  • The body is always truncated at MAX_RESPONSE_BYTES (100,000 bytes)

http_download — Download File

Download a file from a URL and save it to disk.

Parameters

ParameterTypeRequiredDescription
urlstringyesURL to download from
pathstringyesDestination file path
headersRecord<string, string>noRequest headers

Returns

Confirmation with the saved file path and size.

Notes

  • Timeout is 120 seconds (longer than standard fetch)
  • Path is subject to sandbox enforcement — writes outside allowed directories are rejected
  • Parent directories are created automatically if they don’t exist