A template is a config that has been given a human-readable name. Every config in the account was created by a scrape at some point; the template tools let the agent find those configs, name them and manage their URL lists and selectors.
Upstream base path: /user-templates. All tools take apiKey. Every configId must appear in the user's activity logs.
list_templates
Upstream: GET /user-templates
Lists every template the user has saved. Parameters: apiKey only.
list_available_configs
Upstream: GET /user-templates/available-configs
Lists config ids the user has used but not yet saved as a template, with the extracted field names and a sample URL for each. This is the tool to check before building anything new: reuse beats rebuilding.
url_contains(string) — case-insensitive substring match against each config's sample URL, e.g."migros". By far the cheapest way to find the config you want.limit(integer 1–200, default25).offset(integer ≥ 0, default0).
{
"name": "list_available_configs",
"arguments": { "apiKey": "js_YOUR_API_KEY", "url_contains": "shop.example.com", "limit": 10 }
}{
"total_configs": 2074,
"matched": 14,
"returned": 10,
"offset": 0,
"url_contains": "shop.example.com",
"more_available": true,
"next_offset": 10,
"configs": [
{
"config_id": 4412,
"sample_url": "https://shop.example.com/c/dresses",
"fields": ["page_url", "name", "price", "link"]
}
]
}The upstream endpoint returns everything in one unpaginated array; measured at 54 KB on a normal account, more than an agent can receive. Filtering and paging happen in the MCP server, which is why total_configs and matched differ.
fields is derived from what that config's last run actually returned. An empty fields means the run produced nothing, not necessarily that the config has no selectors.
create_template
Upstream: POST /user-templates
Saves an existing config as a reusable template.
configId(integer ≥ 1, required).name(string, required) — human-readable name.
Each config can be saved once; a second attempt returns Conflict (409).
{
"name": "create_template",
"arguments": { "apiKey": "js_YOUR_API_KEY", "configId": 4412, "name": "Example Shop — dresses" }
}update_template
Upstream: PATCH /user-templates/:configId
Updates a saved template. Provide at least one of url, name or isActive.
configId(integer ≥ 1, required).urlID(integer ≥ 1, required) — the URL record the API validates against.url(string) — new URL.name(string) — new template name.isActive(boolean) — whether the template is active.
{
"name": "update_template",
"arguments": { "apiKey": "js_YOUR_API_KEY", "configId": 4412, "urlID": 5, "isActive": false }
}Typical order
1. list_available_configs(url_contains) → find the config a previous scrape created
2. create_template(configId, name) → give it a name
3. add_template_url / add_template_bulk_urls → extend its URL list
4. create_template_selector → add fields (and transformations)
5. create_template_routine(configId) → routineId
6. set_routine_concurrency(routineId, n) → before a long run
7. run_routine(routineId) → dispatch_id
8. check_job(dispatch_id) → results + diagnosticsMost template endpoints call a microservice in the background. If that call exceeds its timeout you receive Gateway Timeout (504); retrying usually resolves it.