gecko from-docs is
the on-ramp: it reads the docs and hands the comprehension engine a draft OpenAPI.
What it does
- Fetch the doc page — SSRF-validated (private / loopback / link-local ranges and non-HTTP schemes are refused, every redirect re-checked). The bytes are parsed and discarded: Gecko is control-plane only, it never stores the doc.
- Recover candidate operations from the page’s structure — headings, code blocks, and
parameter tables, in document order — into a draft OpenAPI 3.1. JSON-RPC methods are
modeled honestly (one operation per method; the envelope carried on
x-jsonrpc-*). - Comprehend the draft through the same engine as any spec → question-shaped, first-call-correct agent tools.
It’s an assistive draft, not zero-touch
from-docs is honest about its uncertainty. Every field it couldn’t pin down from the docs
is flagged with x-review and a confidence level in the draft spec — so a human (or an
agent) confirms those before going live. It gets the surface and shape right; you confirm
the ambiguous edges, then run gecko test <draft> to prove the calls before
you ship.JS-heavy doc sites
Static docs work out of the box with the built-in reader — no extra dependencies. For doc sites that render their navigation with JavaScript,from-docs tells you when it recovered
only a few operations and points you at the agent-browser driver in
spikes/docs_reader,
which renders the JS nav before extracting.
Why this matters
This is the painful-API wedge, made concrete. A coding agent can one-shot a popular, well-specified API — it can’t one-shot the Nth painful one with no OpenAPI.from-docs
turns that API’s docs into agent-usable tools without you hand-writing a client or a spec.