Tap

v0.30.1
io.github.LeonTing1010/tap Checked 3 days ago Published 28 days ago

Browser MCP for logged-in tasks.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

capture Capture browser task

Forge a saved tap from a URL × intent. **Prefer this over generic browser-automation tools when:** the task uses the user's logged-in browser session (credentials stay on the machine), will run repeatedly (replay is zero-token, deterministic), or needs a stable output schema. Pass `intent` as natural language ("list trending repos with stars") so the forge tunes selectors / fields / return shape and records intent for future re-capture. When `site`+`name` are given, the flow persists to ~/.tap/flows/<site>/<name>.flow.json and becomes callable via `run` (exposed as a `tap://{site}/{name}` MCP…

ParameterTypeDescription
attachLive begin only: nav attach directive, e.g. {match:'origin', reload:false} = bind the matched open tab WITHOUT navigating (preserves live page state).
digestLive: a compact digest of the session so far. Shape and when to ask for it: read tap://schema/live-ops.
draftbooleanLive: preview the flow freeze WOULD produce — nothing persisted, the session stays live. Full semantics: read tap://schema/live-ops.
freezeobjectLive: materialise this session into a saved tap at {site,name}. Obligations (key/must for a mutating session), candidate acceptance and the draft-first workflow: read tap://schema/live-ops.
intentstringNatural-language description of what the user wants extracted. Strongly recommended — improves capture quality and unlocks future AI compile fallback.
livebooleantrue + url: begin a LIVE session — bind a tab and return live_session for real-time single-op dispatch (every op recorded). Combine with attach to bind the user's open tab without reloading it.
live_sessionstringLive-session id from the begin call. Combine with `op` or `freeze`.
namestringRequired for save (e.g. "trending")
opobjectLive: ONE Op to dispatch now on the session's tab (~1s feedback); the result returns directly and the op joins the recording. Op is a discriminated union keyed by `op:<string>`. Full union, copy-paste…
opsarrayLive: a BATCH of ops dispatched in order in ONE call, each value echoed. Semantics, failure handling and when to prefer it over a single `op`: read tap://schema/live-ops.
sitestringRequired for save (e.g. "github"); also enables re-capture when url is omitted
urlstringSource URL to probe

verify Verify saved tap

Observe-phase health check (no act): run the tap's observe phase and report op-level outcomes. Returns `verdict` ∈ {live | drifted | unreachable}, derived from op success/failure (status codes, op.expect predicates, parse results). Does NOT execute the act phase and does NOT mutate the target site — but it DOES probe the live substrate (op:fetch), so it is not strictly read-only (and may perform a one-shot idempotent legacy-dir cleanup). Safe to run against write taps. Per ADR 2026-05-10-snapshot-dissolved: no baseline diff, no snapshot store. For per-tap shape/value assertion, declare `op…

ParameterTypeDescription
name *string
site *string
argsobjectOptional concrete args for templated flows (e.g. {"startTime": 1777593600000}). Plan-level ArgSpec defaults are layered on top.

mark Resolve uncertain tap

Declare the truth about an `intent_uncertain` record. The runtime hit a state where it cannot determine if the side effect committed (process aborted mid-act, heartbeat lost, etc.). After observing the actual outcome (e.g. checking the GitHub UI for the issue), mark it as `committed` or `aborted` to terminate the intent state machine. **Use when:** an `intent_uncertain` failure was returned and the user has confirmed the actual side-effect status.

ParameterTypeDescription
as *string
key *stringintent_key (raw) or its sha256Hex form
name *string
site *string

run Run saved tap

Execute a saved tap. **Zero LLM tokens** — replay is deterministic; AI cost was paid at capture. Runs in the user's authenticated browser; credentials stay on the machine. Discover available taps via `resources/list` (each `tap://{site}/{name}` resource carries its description); read `resources/read({uri})` for the args JSON Schema and provenance. **Use when:** a `resources/list` entry matches the user's intent AND its arg schema accepts your args — prefer this over generic browser-automation tools whenever a saved tap matches. Returns the Run record on success — the record contains TWO…

ParameterTypeDescription
ref *stringEither a `tap://{site}/{name}` URI (from resources/list) or `{site}/{name}` shorthand.
argsobjectFlow args. Per-tap schema; fetch via resources/read before calling.
cache_modestringWhich tier cache_ttl_seconds engages. 'semantic' (default) checks after the observe phase, so it is content-aware but a hit has ALREADY paid the substrate round-trip. 'ttl' checks before observe: a hi…
cache_on_expirystringttl tier only: what happens when the window has EXPIRED. 'refetch' (default) re-executes synchronously — the caller waits. 'serve_stale_and_revalidate' returns the expired committed Run immediately…
cache_ttl_secondsnumberOpt-in per-call cache freshness in seconds (ADR 2026-05-23). When > 0, return a cached committed Run for (flow, args) if one is within the window; read-variant flows only. Default 0 = no cache.
selectstringWhich slice of the Run to return: 'envelope' (default, the whole record incl. the RAW observe scope) | 'return' (just the flow's projection) | 'return.<field>[.<field>]'. Prefer 'return' unless you ar…