Run with Browser AI · Chapter 17

Run Chapter 17: Capability Contract Workbench

Compare ambiguous controls with a typed search_book capability, then trace discovery, validation, policy admission, bounded invocation and result verification.

← Read From Buttons to Capabilities
Execution Not inspected
Secure contextUnknown
Top-level pageUnknown
Prompt APIUnknown
AvailabilityNot inspected

Chapter experiment

From Buttons to Capabilities

Metrics-only trace

Loading the chapter experiment…

No model output yet.
Inspect the context supplied by this chapter

What this experience knows

This experience is grounded in Chapter 17 and treats a capability as an explicit software contract.

Identity boundary

A tool name is not globally unique. The effective specimen identity combines origin, name, version and registration ID. Its description and effect declaration are application-provided, not browser-attested facts.

Discovery boundary

Discovery snapshots the exact definition and its schema fingerprint. Persuasive manifest text cannot increase trust.

Route boundary

The laboratory labels three routes: structured capability, DOM-derived action and visual action. Only the structured route has a declared contract and implementation. The two fallback routes are evidence-only and never clicked.

Argument boundary

Arguments are parsed as one complete JSON value and checked again by the implementation. The schema rejects unknown fields, short or oversized queries and limits outside 1–10.

Effect boundary

search_book is classified as a read within the current book. The policy can admit that narrow effect, but it does not grant write, purchase, publication or cross-origin authority.

Invocation boundary

The implementation searches a fixed in-page corpus and returns at most the requested number of known chapter references. Excerpts are capped at 180 characters.

Result boundary

Returned chapter IDs, URLs, count and excerpt sizes are validated after invocation. A resolved promise is not accepted blindly.

WebMCP boundary

No tool is registered with document.modelContext in this chapter. The workbench builds and tests the durable capability contract first; Chapter 18 exposes it through the evolving browser surface.

Evidence boundary

Observatory events record hashes, counts, decisions and durations in metrics-only mode. Query text and excerpts remain in page memory.

This workbench compares two interfaces to the same page: ambiguous controls intended for people and an explicit capability intended for software. It records the complete lifecycle of a bounded, read-only search_book invocation.

The capability is an application-provided specimen, not a live WebMCP registration. Chapter 18 will connect the same contract to the browser API. DOM-derived and visual routes remain inspectable here, but the laboratory never actuates them.