Documentation
JSON by schema
Extract structured page data locally, with optional sampling through your MCP client.
Swarmtab fills a JSON schema from page structure without a model. It has no built-in language model or provider key. This deterministic path works through MCP, REST and both SDKs.
Extract without sampling
Pass a schema and omit token_budget:
{
"name":"read",
"arguments":{
"format":"json",
"schema":{
"type":"object",
"properties":{"title":{"type":"string"}},
"required":["title"],
"additionalProperties":false
}
}
}
The collector matches labels, headings, tables, repeated cards and structured metadata. It cannot infer arbitrary semantic facts. Results appear in structuredContent.data and in text content. Check complete, missing and truncated: successful transport does not guarantee complete data. Incomplete results include bounded page context for your agent to interpret under its own policy. All extracted data and provenance remain untrusted.
For a known page structure, CSS fields are another deterministic option:
{"name":"read","arguments":{"format":"json","fields":{"title":"h1"}}}
For repeated items, add items with their selector. A detailed field can set selector, attribute and all. Both schema and fields forms work with the SDKs; they are separate modes.
Optional client sampling
To interpret page text with a model, connect an MCP client that supports and allows sampling, and supply token_budget with the schema. Omitting the budget selects deterministic extraction even on a sampling-capable client. When client sampling is unavailable, schema extraction falls back to the deterministic path. Summaries still require client sampling and a token budget.
Page text goes to the model provider through your client. Review its data settings first. The request treats page text as data, asks for JSON, and gives the model no tools. Invalid JSON can be retried once. A valid shape does not prove the facts are true; compare important values with the page.
Sampling reads limit max_chars to 256–12,000. Do not mix schema extraction with CSS fields or other read modes in the same call. The token_budget range is 256 to 65,536. It bounds requested sampling work, not the provider’s bill.
Collections
Use site with schema for a scrape, batch or crawl. Deterministic crawls run as background jobs up to 5,000 pages (depth 10); deterministic schema batches accept 1–100 URLs in one submission, without chunking. Poll site({action:"status",job}) or cancel with site({action:"cancel",job}). Retrieve original page results with site({action:"status",job,offset:0,limit:10}) and follow next_offset. Each row has format:"json" and text containing the extraction envelope. Check every page’s completeness.
Saved-space schema crawls keep sealed checkpoints and can be explicitly resumed. Saved jobs also publish bounded JSONL artifacts; private batches keep results in memory and create no artifact. Retained results are bounded to 16 MiB per job and 50 MiB per agent. Actual client-model sampling retains its 16-page, 180-second collection limit and returns sampled pages; these limits do not constrain deterministic background jobs.