Title: Draft an extraction schema from a description Upstream: POST /webhook/generate-schema
Turns a plain-language description of the data you want into a JSON schema you can hand to ai_scrape. It reasons from your description alone: it does not open a URL, and it does not produce CSS selectors.
Parameters
apiKey(string, required).prompt(string, required) — what you want extracted, naming each field and saying what it is.previous_schema(object) — a schema from an earlier call, to refine instead of starting over.feedback(string) — what was wrong withprevious_schema.
First draft
{
"name": "generate_schema",
"arguments": {
"apiKey": "js_YOUR_API_KEY",
"prompt": "product list: name, sku, current price, price before discount, product link"
}
}Refining it
{
"name": "generate_schema",
"arguments": {
"apiKey": "js_YOUR_API_KEY",
"prompt": "product list: name, sku, current price, price before discount, product link",
"previous_schema": {
"name": "string",
"sku": "string",
"price": "string",
"old_price": "string",
"link": "string"
},
"feedback": "price and old_price came back as text; they should be numbers. link should be an absolute URL."
}
}Where it fits
generate_schema(prompt) → schema draft
│ review, refine with feedback
▼
ai_scrape(url, schema) → records shaped like the schemaFor selectors, look at the page yourself with get_html, or find its JSON API with discover_api_endpoints, and write them against that shape.
Older descriptions of this tool said it analysed a URL and returned CSS selectors. That is no longer what it does. If an agent expects selectors from it, point it at get_html and discover_api_endpoints instead.