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:
| Selector | Targets |
|---|---|
form | The first <form> on the page |
#signup-form | A form with id="signup-form" |
.contact-modal form | A form inside .contact-modal |
button | The 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:
- The element matching the Click Selector is clicked (opens the modal)
- 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:
- Click Create Tool above the tool list
- Enter one or more URLs (one per line)
- Click Create Tools
- The system fetches each URL, parses forms and buttons, and merges new tools with existing ones
Tool name inference from forms
| Form characteristics | Tool name |
|---|---|
password + email fields + signup keywords | signup |
password + email fields + no signup keywords | login |
message field present | contactSales |
email only (≤2 fields) | subscribe |
| Other forms | submitForm |
Tool name inference from buttons
| Button text matches | Tool name |
|---|---|
| signup patterns | signup |
| login patterns | login |
| contact patterns | contactSales |
| pricing patterns | viewPricing |
| booking patterns | booking |
| subscribe patterns | subscribe |
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. Setsmetadata.triggerSelectorandmetadata.inModal = trueon 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 created404— Website not found500— Internal error