fetch.md

 1Fetch raw content from a URL as text, markdown, or html (max 5MB); no AI processing. Optional `jq` parameter filters JSON responses server-side — use it for counting, extracting, or aggregating API data instead of loading the full payload. For analysis or extraction of prose/HTML use agentic_fetch.
 2
 3<when_to_use>
 4Use this tool when you need:
 5- Raw, unprocessed content from a URL
 6- Direct access to API responses or JSON data
 7- HTML/text/markdown content without interpretation
 8- Simple, fast content retrieval without analysis
 9- To save tokens by avoiding AI processing
10- To count, sum, or extract fields from a JSON API response (use the `jq` parameter)
11
12DO NOT use this tool when you need to:
13- Extract specific information from a webpage (use agentic_fetch instead)
14- Answer questions about web content (use agentic_fetch instead)
15- Analyze or summarize web pages (use agentic_fetch instead)
16</when_to_use>
17
18<usage>
19- Provide URL to fetch content from
20- Specify desired output format (text, markdown, or html) — optional when `jq` is set
21- Optional timeout for request
22- Optional `jq` expression to filter JSON responses. When set, the body is parsed as JSON and the expression is applied server-side; `format` is ignored. Examples:
23  - `jq: "length"` — count items in a top-level array
24  - `jq: "[.[].name]"` — extract names from an array of objects
25  - `jq: "[.[].models | length] | add"` — sum nested array lengths
26  - `jq: ".data | keys"` — list keys of a nested object
27
28If a jq filter fails because it assumed the wrong shape, the error message
29will include an `(input shape: ...)` hint describing the actual top-level
30structure (e.g. `array of 32 items; first item is object with keys: id,
31name, models`). Use that hint to fix the filter — do NOT fall back to
32fetching the raw payload.
33
34When fetching a large JSON response without a `jq` filter, the tool
35appends a trailing `[crush-hint: ...]` banner suggesting you re-issue
36the call with a `jq` expression. Heed it — dumping big JSON into context
37causes context-overflow errors on many providers. The banner is at the
38end of the body so that parsing from the start still works until it.
39</usage>
40
41<features>
42- Supports three output formats: text, markdown, html
43- Auto-handles HTTP redirects
44- Fast and lightweight - no AI processing
45- Sets reasonable timeouts to prevent hanging
46- Validates input parameters before requests
47</features>
48
49<limitations>
50- Max response size: 5MB
51- Only supports HTTP and HTTPS protocols
52- Cannot handle authentication or cookies
53- Some websites may block automated requests
54- Returns raw content only - no analysis or extraction
55</limitations>
56
57<tips>
58- Use text format for plain text content or simple API responses
59- Use markdown format for content that should be rendered with formatting
60- Use html format when you need raw HTML structure
61- Set appropriate timeouts for potentially slow websites
62- If the user asks to analyze or extract from a page, use agentic_fetch instead
63</tips>