Foundations: how agents use a website today|INEMA.CLUB-PRO

Lesson 1 · 15 min

Three ways an agent can use your site: read, operate the screen, call a tool

When an AI agent reaches your site, it does one of three things: it reads the HTML, it operates the screen like a person, or it calls a tool the site has declared. In this lesson you run all three against a sample page and against a real site, and see which one works in each case.

Start the lesson
The back of a dark monitor with three cables of different thicknesses reaching different connectors.

In this lesson you will

  1. 1Read: what a fetch pulls out of your HTML
  2. 2Operate the screen: the agent finds each field by name
  3. 3Call a tool: MCP on the server, WebMCP on the page
  4. 4The course kit running on your machine

Goal: tell reading, operating the screen, and calling a tool apart, and see all three running against the kit's sample page.

01One request, three paths to your site

Click each block.

Click each block in the diagram to see what it does.

Agents that call tools are still a minority in Oct 2026; agents that read and agents that operate the screen show up every day.

02The same request, three ways

Request: "schedule a full service for Ana on 10/25".

1. Read

The agent downloads the HTML and finds out there's a form with three labels. It knows what the page offers, but it doesn't schedule anything: reading doesn't submit.

If the form only appears after JavaScript runs, a reader without a browser never even learns it exists.

03Install the course kit

Just once. It clones the course repository into ~/projetos, installs Playwright 1.63.0 (pinned version, from 09/04/2026) and downloads its Chromium. No step in the course calls a model.

Terminal · install
[ -d ~/projetos/formacao-webmcp-base-v72 ] || git clone -q https://github.com/inematds/formacao-webmcp-base-v72 ~/projetos/formacao-webmcp-base-v72
cd ~/projetos/formacao-webmcp-base-v72/kit
npm ci --no-audit --no-fund && npx playwright install chromium
node -e "import('playwright').then(p => console.log('playwright pronto:', p.chromium.executablePath().split('/').slice(-3).join('/')))"
Example from the repository
added 2 packages in 210ms
playwright pronto: chromium-1243/chrome-linux-arm64/chrome

The first time, npx playwright install chromium downloads the browser (a few hundred MB). The last line shows the Chromium folder the kit will use; on Mac and x86 Linux the name changes.

04The three ways against the example page

The kit serves the Oficina Pedal Livre (a fictional bike shop) page on a server of your own, at 127.0.0.1, and runs the three ways. depois.html has semantic HTML; antes.html is the same screen without labels.

Terminal · depois and antes
cd ~/projetos/formacao-webmcp-base-v72/kit
for p in depois antes; do echo "## $p.html"; node tres-jeitos.mjs $p; echo "saída: $?"; done
Example from the repository
## depois.html
1 · ler     2.2 KB de HTML · h1: Agendar revisão · <form>: 1 · <label>: 3
2 · operar  achou 3 campos e o botão pelo nome · tela diz: Pedido recebido (simulação): revisão completa em 2026-10-25, Ana
3 · chamar  document.modelContext: ausente neste Chromium 153.0.8010.12 → sem ferramentas declaradas, o agente fica no jeito 2
saída: 0
## antes.html
1 · ler     1.7 KB de HTML · h1: (sem <h1>) · <form>: 0 · <label>: 0
2 · operar  travou: não achou o campo "Seu nome" pelo nome em 2 s (o agente teria de adivinhar pela tela)
3 · chamar  document.modelContext: ausente neste Chromium 153.0.8010.12 → sem ferramentas declaradas, o agente fica no jeito 2
saída: 1

Same screen, opposite result. In depois.html the agent schedules; in antes.html it can't even find the first field, and the script exits with 1. Way 3 is absent in both: the example page has no origin trial token.

05The three ways on a real site

The same script against inema.club, which belongs to INEMA. In your case, use only your own site: the script reads and lists, and never clicks or runs a tool outside the kit.

Terminal · a public site
cd ~/projetos/formacao-webmcp-base-v72/kit
node tres-jeitos.mjs https://inema.club/; echo "saída: $?"
Template · your site
cd ~/projetos/formacao-webmcp-base-v72/kit
node tres-jeitos.mjs https://<your-site>/<page with a form>; echo "saída: $?"
Example from the repository
1 · ler     104.2 KB de HTML · h1: INEMA.CLUB Portal INEMA · <form>: 1 · <label>: 1
2 · operar  146 controles na árvore · 0 sem nome (esses o agente teria de adivinhar pela tela)
3 · chamar  document.modelContext: presente neste Chromium 153.0.8010.12 · 8 ferramenta(s) registrada(s): buscar_conhecimento, buscar_cursos, comparar_cursos, consultar_atualizacoes, …
saída: 0

On the real site, way 2 counts the controls in the tree and how many have no name. Way 3 shows up: inema.club publishes an origin trial token in a meta tag, and the kit's Chromium 153 (inside the trial's 149–156 range) exposes document.modelContext. The script only calls getTools(), which lists; it doesn't run any tool.

06WebMCP in 30 seconds

The concept in 30 s. Two notes from 10/19/2026: the "form that becomes a tool" is the declarative API, which was left out of the spec and only exists in Chrome; and security isn't up to the site alone: prompt injection is not solved, and course 4 covers it.

WebMCP in 30 seconds · 30 sVideo page with script →

07Practice

Kit installed, the three ways on the example page and on your site.

E1 · Kit installed

10 min

Run the "install" block. If you already have the repository in ~/projetos, it only installs the dependencies.

Done when: the block ends with the line playwright pronto: followed by the Chromium folder (e.g. chromium-1243/…/chrome).

E2 · Same screen, opposite result

5 min

Run the "after and before" block and compare line 2 of the two pages.

Done when: node tres-jeitos.mjs depois → 2 · operar achou 3 campos e o botão pelo nome and saída: 0; node tres-jeitos.mjs antes → travou and saída: 1.

E3 · Your site, the three ways

10 min

Run the template on the page of your site that has the most important form (contact, booking, search). Write down the three lines: they go into the plan for lesson 8.

Done when: the output has the lines 1 · ler, 2 · operar and 3 · chamar, and ends with saída: 0 (no unnamed controls) or saída: 1 with the number of unnamed controls noted down.

08Lesson quiz

Question 1 of 4

An agent downloads the HTML of your booking page and replies that a form exists. Which of the three ways did it use?skill

09In three sentences

Three waysRead the HTML, operate the screen, call a declared tool.
Names are everythingTo operate the screen, the agent finds each control by role and name.
A tool is extraWebMCP only shows up with an origin trial; the form is still the path.

Going further

Next lesson