bots-garden/mini-mepublic Fork
⑂ fix/tool-order
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 0d48ec0 · on fix/tool-order · k33g · Sep 29, 2026
fetch-a-web-page.md · 65 lines · 3.0 KBmarkdown
Blame HistoryOpen raw

How to fetch a web page as Markdown

This guide shows how to let the model read a web page, or save it to a file, with the built-in fetch_content tool. It assumes you already run mm with a configuration file.

Steps

  1. Turn the tool on in your configuration file (it is off by default):

    fetchContentTool: true
    
  2. Start mm and check that the start-up banner lists fetch_content among the tools.

  3. Ask for the page in plain words, in any language:

    fetch the content of https://k33g.org
    
    récupère le contenu de https://k33g.org
    

    The terminal shows 🌐 fetch_content: https://k33g.org, then the first lines of the Markdown, and the model answers from it.

Save the page to a file instead of showing it

Name the file and say not to display it:

récupère le contenu de https://hello.com mais ne l'affiche pas et sauve le dans hello.txt

The model passes output: hello.txt. The Markdown is written to hello.txt (relative to the directory mm runs in, or to the project opened in the editor) and the tool returns only one line:

[fetch_content: saved 9 lines of Markdown (421 bytes) from https://hello.com to hello.txt — the content is not shown]

The page does not enter the conversation, so a long page does not use up the context window.

Variants

  • A URL typed carelessly. k33g.org and https//k33g.org both work: a missing scheme becomes https://, a missing colon is added back.
  • Complex tables. Tables with merged cells are kept as raw HTML by default. Ask for flattened tables ("…as Markdown tables, flatten them") and the model passes tables: flatten.
  • Strikethrough and task lists. Ask for them explicitly ("keep the struck-through text", "keep the checkboxes") and the model passes strikethrough: true or taskList: true.
  • Links relative to another site. If the page is a mirror, ask to resolve links against the original; the model passes baseUrl.
  • In an editor (ACP) or with permissions: ask. Reading a page needs no permission; saving it to a file asks first, like write_file.

When it fails

The model receives [fetch_content: error N (…) — reason] and usually tells you why:

  • error 2 (input): the site is unreachable, returned an HTTP error, or its robots.txt forbids robots to read that page. mm does not bypass robots.txt.
  • error 1 (conversion): the URL is not an HTML page (a PDF, JSON, an image) or is larger than 5 MiB.
  • error 3 (usage): the call itself is wrong, for example an ftp:// URL.

If the model uses curl through bash instead, the tool is probably not declared: check fetchContentTool: true and the banner.

See also

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# How to fetch a web page as Markdown

This guide shows how to let the model read a web page, or save it to a file, with the built-in `fetch_content` tool. It assumes you already run `mm` with a configuration file.

## Steps

1. Turn the tool on in your configuration file (it is off by default):

   ```yaml
   fetchContentTool: true
   ```

2. Start `mm` and check that the start-up banner lists `fetch_content` among the tools.

3. Ask for the page in plain words, in any language:

   ```text
   fetch the content of https://k33g.org
   ```

   ```text
   récupère le contenu de https://k33g.org
   ```

   The terminal shows `🌐 fetch_content: https://k33g.org`, then the first lines of the Markdown, and the model answers from it.

## Save the page to a file instead of showing it

Name the file and say not to display it:

```text
récupère le contenu de https://hello.com mais ne l'affiche pas et sauve le dans hello.txt
```

The model passes `output: hello.txt`. The Markdown is written to `hello.txt` (relative to the directory `mm` runs in, or to the project opened in the editor) and the tool returns only one line:

```text
[fetch_content: saved 9 lines of Markdown (421 bytes) from https://hello.com to hello.txt — the content is not shown]
```

The page does not enter the conversation, so a long page does not use up the context window.

## Variants

- **A URL typed carelessly.** `k33g.org` and `https//k33g.org` both work: a missing scheme becomes `https://`, a missing colon is added back.
- **Complex tables.** Tables with merged cells are kept as raw HTML by default. Ask for flattened tables ("…as Markdown tables, flatten them") and the model passes `tables: flatten`.
- **Strikethrough and task lists.** Ask for them explicitly ("keep the struck-through text", "keep the checkboxes") and the model passes `strikethrough: true` or `taskList: true`.
- **Links relative to another site.** If the page is a mirror, ask to resolve links against the original; the model passes `baseUrl`.
- **In an editor (ACP) or with `permissions: ask`.** Reading a page needs no permission; saving it to a file asks first, like `write_file`.

## When it fails

The model receives `[fetch_content: error N (…) — reason]` and usually tells you why:

- `error 2 (input)`: the site is unreachable, returned an HTTP error, or its `robots.txt` forbids robots to read that page. `mm` does not bypass `robots.txt`.
- `error 1 (conversion)`: the URL is not an HTML page (a PDF, JSON, an image) or is larger than 5 MiB.
- `error 3 (usage)`: the call itself is wrong, for example an `ftp://` URL.

If the model uses `curl` through `bash` instead, the tool is probably not declared: check `fetchContentTool: true` and the banner.

## See also

- Every field, rule and error code: [built-in tools reference](../reference/tools.md#fetch_content)
- The configuration key: [configuration reference](../reference/configuration.md)
- Why the tool works this way: [the `fetch_content` tool](../explanation/fetch-content-tool.md)