# Test an X card (`mttr_x_card`)

Updated October 24, 2026.

## What does mttr_x_card do?

Tests one live link’s X card: its twitter: tags against what X’s card docs list, its image, whether robots.txt keeps X’s crawler out, and for a player card whether the player route’s headers let X frame it. Any key may make this call, on any public site.

Who may call it: Any key.

## When to use it

- Before you post a link you want to run inside a post on X.
- A post shows a plain image, a blank frame, or the wrong card.

## What you ask

You might say: “Will https://example.com/in-post work as a player card on X?”

```
mttr_x_card({ url: "https://example.com/products/linen-shirt" })
```

| Argument | Type | Needed | What it is |
| --- | --- | --- | --- |
| `url` | Text | Yes | The link to be posted, as a full public address such as https://example.com/in-post. |

## What comes back

- Each card tag found, and what is wrong with it in words.
- For a player card, each host X frames from, let in or refused, with the headers as sent.
- The curl lines to fetch the link and its player as X’s crawler, since mttr fetches under its own name.
- A page robots.txt closes to mttr is not fetched.

A sample, with made-up sites and figures:

| Check | State | What it means |
| --- | --- | --- |
| twitter:card | player | X may frame the player route |
| twitter:player | Relative | Give the full https address |
| x.com | May frame it | frame-ancestors lets it in |
| X-Frame-Options | DENY | Send none on this route |

## Over HTTP

```
curl "https://mttr.si/api/v1/check/x-card?url=https%3A%2F%2Fexample.com%2Fproducts%2Flinen-shirt" \
  -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 used this hour’s free checks | 429 | The answer says x card checks are limited to an hourly allowance. Try again within the hour. |

## 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_x_card in the API reference](https://mttr.si/docs/reference#mttr_x_card).

## Goes with

- [What an agent reads](https://mttr.si/docs/tools/agent-view.md)
- [One page](https://mttr.si/docs/tools/page.md)
