proving ground
Agent playground
This page is a course an agent can run, in your browser: discover the site-wide WebMCP catalog, call the in-page window.__tools API, and return the structured results those tools promise. The basics are confirmed on load; three challenges are left for your agent.
This page as markdown:/for-agents/playground.md.
Environment
- webmcp
- enable JavaScript to probe
- window.__tools
- enable JavaScript to probe
The page probes document.modelContext (the canonical WebMCP surface) and falls back to navigator.modelContext (older preview runtimes). Where neither exists the check is skipped, not failed — the window.__tools path works in any browser.
WebMCP catalog
The catalog is the site-wide WebMCP toolset; slugs become snake_case tool names.
| tool | page | does |
|---|---|---|
| base64 | /tools/base64 | Unicode-safe Base64 encode and decode, with URL-safe variant. |
| url | /tools/url | Percent-encode and decode URLs and query components. |
| jwt | /tools/jwt | Decode a JWT's header, payload and time claims — or encode and HMAC-sign a new token. All in the browser. |
| hash | /tools/hash | SHA-1 / SHA-256 / SHA-384 / SHA-512 of text or files, via WebCrypto. |
| radix | /tools/radix | Binary, octal, decimal, hex — arbitrary precision via BigInt. |
| timestamp | /tools/timestamp | Epoch seconds/millis ⇄ human dates, timezone-aware, with relative time. |
| cron | /tools/cron | Cron expression → plain-English schedule + the next run times. |
| uuid | /tools/uuid | UUID v4 and v7, single or bulk, copy-ready. |
| json | /tools/json | Pretty-print, minify, validate — with precise error positions. |
| case | /tools/case | camelCase, snake_case, kebab-case, Title Case, CONSTANT_CASE and more. |
| diff | /tools/diff | Line and word diff of two texts, computed locally. |
| regex | /tools/regex | Live match highlighting, capture groups, and a common-pattern library. |
| markdown | /tools/markdown | Split-pane markdown editor — live preview, right-to-left aware, copy as HTML, Markdown, or rich text. |
| count | /tools/count | Words, characters, lines, sentences, reading time — plus a live token count (GPT o200k by default, switchable to cl100k or Llama 3). |
| plot | /tools/plot | Plot functions on an interactive canvas — pan, zoom, multiple expressions, shareable links. |
| lorem | /tools/lorem | Filler text by the word, sentence, or paragraph — copy-ready. |
| csv | /tools/csv | CSV to JSON and back — quoted fields, custom delimiters, header-row toggle. Values stay strings. |
| color | /tools/color | Hex, rgb, hsl, and oklch — plus a tints-and-shades palette and a WCAG contrast checker. |
| data | /tools/data | Convert between JSON, YAML, TOML, and TOON — auto-detects the input, points at the exact parse error, and shows the token-count savings of TOON's compact tabular arrays. |
| qr | /tools/qr | Text or URL → QR code as crisp SVG, with download. Decodes images too, where the browser can. |
| contact | /tools/contact | Compose a prefilled email draft, plus quick contact links — email, GitHub, LinkedIn. Opens in your own mail client. |
21 tools at build · re-enumerated live by the checks below
Scorecard
scorecard idle — checks run when JavaScript loads
automated checks
What this page confirms about your browser's agent layer — checked on load, again on demand (run({ action: "checks" }) or the button). Local and deterministic, each compared to a known answer:
WebMCP runtime presentpending
queued — runs on load
tool catalog registered site-widepending
queued — runs on load
window.__tools API live on this pagepending
queued — runs on load
describe() honors the contract shapepending
queued — runs on load
deterministic run matches the pinned valuepending
queued — runs on load
async run resolves the pinned digestpending
queued — runs on load
run() output carries its published keyspending
queued — runs on load
agent challenges
Three challenges the page cannot do for you — each exercises a real invocation path, and the playground grades the submission. Every one runs on the same challenge phrase:
agent proving groundagent-describecall describe() on the base64 toolpending
Read the base64 tool's contract —
window.__tools["base64"].describe()on/tools/base64, or fetch/tools/base64.json— and submit the array of its params keys.awaiting your submission
agent-base64run the base64 tool on the phrasepending
Encode the challenge phrase with the base64 tool — the site-wide WebMCP
base64tool works from this very page, orwindow.__tools["base64"].run({ input })on/tools/base64, or the URL form/tools/base64#input=…— and submit the encoded output.awaiting your submission
agent-hashhash the phrase with SHA-256pending
Digest the challenge phrase with the hash tool — the WebMCP
hashtool, orwindow.__tools["hash"].run({ input, algo: "SHA-256" })on/tools/hash(async — await it) — and submit the hex digest.awaiting your submission
Submit with run({ action: "submit", challenge: "<id>", result: <your value> }). The scorecard row flips live; a tool's structured return is accepted as well as the bare string, and re-submission is allowed.
Drive it headlessly
The scorecard is driveable headlessly. The page registers window.__tools["playground"] with the standard run()/describe() shape — run() returns structured values and is async, so await it:
const pg = window.__tools["playground"];
pg.describe(); // the contract for this API
await pg.run({ action: "checks" }); // re-run the automated suite
const { phrase, challenges } = await pg.run({ action: "challenges" });
// … exercise a tool on the phrase, then:
await pg.run({ action: "submit", challenge: "agent-base64", result: "…" });The contract this page proves lives at/for-agents. Tool contracts:/SKILL.mdand thetools manifest.