Skip to content

Giving My AI Eyes, Then a Reader

MCP server screenshots show a model how a page looks. Structured page text tells it what the page says. Two small tools and where each fits.

On this page

A coding agent can rewrite your stylesheet, report that the hero is now centred, and be working entirely from imagination. It has read the CSS. It has not seen the page. MCP server screenshots fix that particular blindness, and then you discover that seeing a page and reading it are two different skills.

I built a tool for each. longshot, started in June 2026, takes pictures. sitegraf, started in August, takes notes. First it could look. Then it could read. Progress.

Why the source code isn’t enough

HTML and CSS are instructions. The page is what happens after a browser follows them, with fonts loaded, scripts run, images fetched and a few hundred rules arguing about precedence. Asking a model to predict that from source is asking it to taste a dish by reading the recipe. It will have opinions. Some will be right.

So both tools do the unglamorous thing and open a real browser through Playwright. Whatever the agent gets back comes from a rendered page.

MCP server screenshots give the model a look

longshot is a command line tool and also an MCP server. The server offers three tools: capture one page, capture a list, or crawl a site and capture what it finds. A single page defaults to the desktop viewport. A site crawl defaults to desktop and mobile, since a site survey that skips phones has surveyed half a site.

The pictures are full length. Playwright’s full page screenshot option does the final capture, and the work before it matters more than the click. The tool lets the network settle, scrolls down in steps so lazy images load, zeroes out animation and transition timings, returns to the top and then shoots. Skip that and your agent will diagnose a “missing image bug” that is really a picture of a page that hadn’t finished getting dressed.

The design choice I’d copy into any server like this: answer with file paths. An MCP tool result can carry images directly, and it’s tempting. But a full page capture of a long page is a big image, and a crawl produces dozens.

sequenceDiagram
  participant A as Agent
  participant L as longshot
  participant B as Browser
  participant F as Folder
  A->>L: capture this page
  L->>B: render, scroll, shoot
  B-->>L: full page image
  L->>F: save PNG, manifest and gallery
  L-->>A: JSON with file paths
  A->>F: open the one image it needs

The pixels stay on disk until somebody wants them. By default the reply carries no image, just JSON saying where each file landed. A librarian who brings you every book in the building has not helped.

The manifest also makes the folder a cache: asking for the same page again reuses the capture unless you request a fresh one.

What a picture is good for

A screenshot answers questions about appearance, the ones source code is worst at:

  • Is anything overlapping or falling off the edge?
  • Does the layout survive a narrow screen?
  • Did the spacing change look the way it sounded?
  • Which element actually dominates the page?

These are visual facts. One image settles them.

Now ask the same image for the exact href behind a button. Or the full text of a pricing table across twelve pages. Or whether two pages share a navigation menu. The model can squint and transcribe, and small text in a tall image is where confident transcription goes to die. A link target isn’t in the picture at all.

Then it needed to read

sitegraf starts from a different sentence: a URL goes in, one JSON file comes out, and a model is the reader. It records what is visible and how it nests: headings, paragraphs, lists, tables, links, calls to action, image URLs with alt text, form labels, navigation and footers.

Raw HTML is mostly scaffolding, and the model pays for every bracket. Strip it to plain text and you swing too far: a pricing card, its price and its button become three unrelated lines, and the model has to guess which goes with which. Structure is the information.

Here’s a sketch of what survives:

json
{
  "route": "/pricing",
  "sections": [
    {
      "heading": "Plans",
      "items": [
        { "title": "Starter", "link": { "label": "Choose", "href": "..." }, "children": [] }
      ]
    }
  ]
}

The browser side collects facts in one pass inside the page: each node’s role, own text, position, a few styles and the shape of its children. Then plain functions, with no browser in sight, turn those facts into sections. Siblings with the same shape become a list of items. Navigation and footers repeated across pages get stated once for the whole site. That matters when size is a constraint: saying the footer forty times teaches the model nothing the first time didn’t.

Notice that geometry still plays. Rectangles and font sizes help decide where a section starts and what its heading is. The reader uses its eyes to work, then hands over text.

Two ideas of “ready”

The two tools settle a page differently, and the difference is instructive.

flowchart TB
  subgraph read["sitegraf, for text"]
    direction TB
    r1["DOM stops changing"] --> r2["Scroll the page"]
    r2 --> r3["DOM stops changing again"]
    r3 --> r4["Freeze animations"]
    r4 --> r5["Take the snapshot"]
  end
  subgraph cam["longshot, for a picture"]
    direction TB
    c1["Network goes quiet"] --> c2["Scroll the page"]
    c2 --> c3["Freeze animations"]
    c3 --> c4["Take the picture"]
  end

Network quiet asks “has the browser stopped fetching?” DOM stillness asks “has the page stopped changing?” A camera cares that the images arrived. A reader cares that the content finished appearing, so it looks again after scrolling. Each wait has a limit, because some pages never sit still, and a tool that waits for perfect calm on a page with a live ticker will wait until retirement.

They are also separate repositories on purpose. longshot’s records are shaped around image files, one for desktop and one for mobile. Bolting extraction onto that would have meant reworking every piece that reads the records. The sitegraf design marked the crawl queue and URL handling as the reusable part and started clean.

Which one to hand your agent

Pick by the question, not by the tool you built most recently.

QuestionBetter source
Does this look right?Screenshot
What does this page say?Structured text
Where does this link go?Structured text
Is the mobile layout broken?Screenshot
What pages exist and what’s on them?Structured text
Why does this section feel cramped?Screenshot

For a redesign, both: the notes say what must survive, the picture says how it currently feels.

The practical differences fit in a few rows.

longshotsitegraf
Hands backPNG files and their pathsa JSON file
Reached throughcommand line and MCPcommand line
Waits fora quiet networka still DOM

sitegraf’s section detection is heuristic work at version 0.1.0, so read its output as a very organised set of notes, not as ground truth about the page.

The page is not your friend

Both outputs bring a stranger’s content into your agent’s context. In the text file it’s obvious: a paragraph on the page that says “ignore your previous instructions” arrives as a paragraph. A screenshot can carry the same words as pixels, and models read pixels.

Keep the tools that look separate from the tools that act, and be deliberate about what an agent may do after reading something from the open web.

Eyes for how it looks, notes for what it says. An agent with neither is redecorating in the dark.