Skip to main content

Manual Tool Management

Fine-tune auto-discovered tools or create new ones by supplying URLs containing forms and action buttons.

Editing Tool Properties

Open the tool detail dialog by clicking any tool row in the Tools list. The following fields are editable:

Page URL

The URL the tool navigates to. Fix it if auto-discovery pointed to a stale or incorrect page.

Selector

A CSS selector that identifies the target element on the page. The default value (form or button) matches the first element of that type, but you can target a specific element when a page has multiple candidates:

SelectorTargets
formThe first <form> on the page
#signup-formA form with id="signup-form"
.contact-modal formA form inside .contact-modal
buttonThe first button
[data-trigger="login"]An element with data-trigger="login"

Click Selector

For forms inside modals or dialogs that require clicking a trigger button first, set a Click Selector. When the tool executes:

  1. The element matching the Click Selector is clicked (opens the modal)
  2. The element matching the Selector is then targeted for the form/button action

This enables tools that open a modal via a "Sign Up" or "Login" button, then interact with the form inside.

Creating Tools from URLs

If auto-discovery missed a page or you want to add tools from specific URLs:

  1. Click Create Tool above the tool list
  2. Enter one or more URLs (one per line)
  3. Click Create Tools
  4. The system fetches each URL, parses forms and buttons, and merges new tools with existing ones

Tool name inference from forms

Form characteristicsTool name
password + email fields + signup keywordssignup
password + email fields + no signup keywordslogin
message field presentcontactSales
email only (≤2 fields)subscribe
Other formssubmitForm

Tool name inference from buttons

Button text matchesTool name
signup patternssignup
login patternslogin
contact patternscontactSales
pricing patternsviewPricing
booking patternsbooking
subscribe patternssubscribe

Deduplication

Manually created tools are deduplicated by name against existing tools. If a tool with the same name already exists, it won't be duplicated.

Persistence

All changes persist immediately to KV and D1. Updated tools are available to the widget within seconds.

API Reference

PATCH /tools/:website_id/:tool_id

Update a tool's properties.

Request body:

{
"pageUrl": "https://example.com/correct-url",
"name": "signup",
"description": "Create a new account",
"active": true,
"selector": "#signup-modal form",
"clickSelector": "[data-trigger='signup']"
}

All fields are optional. Only provided fields are updated.

  • selector: CSS selector for the target form/button element.
  • clickSelector: CSS selector for a modal trigger to click before the main action. Sets metadata.triggerSelector and metadata.inModal = true on the tool.

Response: { tools: [...], toolLimit: "unlimited" }

POST /tools/:website_id/manual

Create tools from user-supplied URLs. Fetches each URL and parses HTML for forms and buttons.

Request body:

{
"urls": ["https://example.com/signup", "https://example.com/contact"]
}

Response: { tools: [...], toolLimit: "unlimited", message: "Created 2 tool(s)" }

Errors:

  • 400 — No valid URLs provided, or no tools could be created
  • 404 — Website not found
  • 500 — Internal error