# Worked examples (`mttr_examples`)

Updated October 24, 2026.

## What does mttr_examples do?

How other sites pass a rule a page fails: pages on sites in the same market, or the nearest sites, that pass it and are closest to the page in meaning, each with the passage that comes closest. A key may make this call on the sites it has claimed.

Who may call it: Your claimed sites.

## When to use it

- You know what a rule asks and want to see it done well.

## What you ask

You might say: “Show me how other sites answer first on a page like /guides/drain-cleaning.”

```
mttr_examples({ site: "example.com", path: "/pricing", rule: "answer-first" })
```

| Argument | Type | Needed | What it is |
| --- | --- | --- | --- |
| `site` | Text | Yes | The site, as a domain such as example.com. |
| `path` | Text | Yes | The page, as a path such as /guides/gravel. |
| `rule` | Text | Yes | A page rule id, as mttr_rules gives it. |
| `limit` | Number | No | How many to return. |

## What comes back

- Pages elsewhere that pass the rule, closest first.
- The passage on each that comes closest, marked as quoted.

A sample, with made-up sites and figures:

| What | Why | How alike |
| --- | --- | --- |
| `rival.example/guides/blocked-drains` | Answers in the first line under the question | 86% |
| `north.example/help/slow-drains` | A short answer, then the steps | 78% |

## Over HTTP

```
curl "https://mttr.si/api/v1/sites/example.com/examples?path=%2Fpricing&rule=answer-first" \
  -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. |
| The key has not claimed the site | 404 | Claim it with `mttr_claim`, then `mttr_claim_check`. |

## Sources

- [Model Context Protocol: tools](https://modelcontextprotocol.io/specification/2025-06-18/server/tools), Model Context Protocol: How an assistant calls a tool.

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

## Goes with

- [One page](https://mttr.si/docs/tools/page.md)
- [Pages that read alike](https://mttr.si/docs/tools/similar.md)
