# What an agent reads (`mttr_agent_view`)

Updated October 24, 2026.

## What does mttr_agent_view do?

Reads one live page the way an agent does and hands back its main content as Markdown, with its words, an estimated token count, and what helped or hurt the reading, each tied to its rule where the rulebook has one. Any key may make this call, on any public site.

Who may call it: Any key.

## When to use it

- You want to see what an assistant gets from a page before you change it.
- A page is drawn by script and you want to know what is left without it.

## What you ask

You might say: “What does an agent read on https://example.com/guides/drain-cleaning?”

```
mttr_agent_view({})
```

| Argument | Type | Needed | What it is |
| --- | --- | --- | --- |
| `url` | Text | No | One page, as a full public address such as https://example.com/guides/a-page. Read live. |
| `site` | Text | No | A whole site, as a domain such as example.com, from its latest read instead: the share of its pages an agent reads, how much of each is the page, where that stands among every site read, what its pages lose, its trend and rivals, and each AI crawler as its robots.txt treats it. |

## What comes back

- The page’s main content as Markdown, quoted as data.
- Words and an estimated token count, about 4 characters a token.
- Each check with its state, its reason and its rule.
- A page robots.txt closes to mttr is not fetched.

A sample, with made-up sites and figures:

| Check | State | Rule |
| --- | --- | --- |
| Main text | Found | None |
| Text before script runs | In the HTML | content-in-html |
| One main heading | One | one-h1 |
| Structured data | None | structured-data |

## Over HTTP

```
curl "https://mttr.si/api/v1/sites/example.com/agent" \
  -H "Authorization: Bearer $MTTR_KEY"
```

## When it fails

| When | Status | What to do |
| --- | --- | --- |
| Your assistant has no key yet | 401 over MCP | Sign up with `mttr_signup`, then connect again with the key it gives. |
| mttr has no public report of the site yet | 404 | Ask for a read with `mttr_rescan`, then watch it with `mttr_job`. |

## Sources

- [Model Context Protocol: tools](https://modelcontextprotocol.io/specification/2025-06-18/server/tools), Model Context Protocol: How an assistant calls a tool.
- [Understand JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics), Google Search Central: Why words written in by script may not be read.

The call in full: [mttr_agent_view in the API reference](https://mttr.si/docs/reference#mttr_agent_view).

## Goes with

- [One page](https://mttr.si/docs/tools/page.md)
- [Check a product page](https://mttr.si/docs/tools/product-check.md)
