> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toolshed.philo.ventures/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare Plugin

> Fetch web pages as clean markdown using Cloudflare's Markdown for Agents content negotiation.

**Plugin ID:** `cloudflare` | **Auth:** None

<Note>
  This plugin uses Cloudflare's "Markdown for Agents" feature, which converts HTML to markdown on-the-fly via content negotiation (`Accept: text/markdown`). It works on any Cloudflare-hosted site with the feature enabled and reduces token usage by \~80% compared to raw HTML.
</Note>

## Tools

### cloudflare.fetch\_markdown

**Name:** Fetch Page as Markdown

Fetch a web page as clean markdown. Falls back to HTML if the site doesn't support markdown content negotiation.

**Input:**

| Parameter        | Type      | Required | Default | Description                                   |
| ---------------- | --------- | -------- | ------- | --------------------------------------------- |
| `url`            | `string`  | Yes      | --      | URL to fetch                                  |
| `fallbackToHtml` | `boolean` | No       | `true`  | Return HTML body if markdown is not supported |

**Output:**

```json theme={null}
{
  "content": "# Page Title\n\nThis is the page content in clean markdown...",
  "contentType": "text/markdown; charset=utf-8",
  "isMarkdown": true,
  "estimatedTokens": 450,
  "url": "https://blog.cloudflare.com/some-article/"
}
```

When `isMarkdown` is `false`, the site doesn't support the feature and the content is HTML (or an error message if `fallbackToHtml` is `false`).
