Summary
menu_tool is fully implemented and documented as the required way to interact with <select> dropdowns, but it's missing from BUILTIN_TOOLS, so the agent calls it (per its own system prompt) and gets Tool 'menu_tool' not found. The same gap affects upload_tool and human_tool.
Root cause
src/agent/tools/service.py:255-256 defines and decorates menu_tool with @Tool('menu_tool', model=Menu) — it's a real, working tool.
src/agent/context/prompt/system.md explicitly tells the agent to use it: e.g. line 71 ("menu_tool — Selects one or more options from a <select> dropdown by their visible label text.") and line 97 ("For dropdown menus (<select> elements), Web-Use uses menu_tool — not click_tool.").
- But
src/agent/tools/__init__.py's BUILTIN_TOOLS list only includes:
BUILTIN_TOOLS = [
click_tool, goto_tool, key_tool, scrape_tool,
type_tool, scroll_tool, wait_tool, back_tool,
tab_tool, done_tool, forward_tool, download_tool,
script_tool,
]
menu_tool, upload_tool, and human_tool are all imported into that file but never added to BUILTIN_TOOLS, even though the system prompt documents and instructs their use throughout (dropdown selection, file uploads, CAPTCHA/OTP/human-in-the-loop escalation).
Reproduction
Ran the CLI against a real <select> dropdown (a county document-search portal requiring a document-type selection):
uv run python src/cli.py --query '...select "Mechanic'"'"'s Lien" from the document type dropdown...' --headless --steps 80
Relevant log excerpt:
[Agent] 🛠️ Tool Call: Menu(index=20, options=["Mechanic's Lien"])
[Agent] 🚨 Tool 'Menu' failed: Tool 'menu_tool' not found.
The agent then fell back to injecting raw JavaScript to set the <select> value directly, which introduced its own bug (unescaped apostrophe in the option label broke the generated script string), and eventually exhausted its step budget without completing.
An earlier run against a different portal also hit the same gap for human_tool:
[Agent] 🛠️ Tool Call: Human(reason=A reCAPTCHA has appeared, blocking further interaction. I need human assistance to solve it.)
[Agent] 🚨 Tool 'Human' failed: Tool 'human_tool' not found.
Impact
Any task that needs to select from a <select> dropdown, upload a file, or escalate to a human (CAPTCHA/OTP) will fail, because the agent is instructed by its own system prompt to use tools that were never registered. The agent has no way to discover this ahead of time and burns its step budget on broken workarounds (JS injection, repeated retries) before giving up.
Suggested fix
Add the three already-implemented tools to BUILTIN_TOOLS in src/agent/tools/__init__.py:
BUILTIN_TOOLS = [
click_tool, goto_tool, key_tool, scrape_tool,
type_tool, scroll_tool, wait_tool, back_tool,
tab_tool, done_tool, forward_tool, download_tool,
script_tool, menu_tool, upload_tool, human_tool,
]
(If any of the three are intentionally excluded — e.g. human_tool needing a UI callback not available in headless/CLI mode — the system prompt should stop instructing the agent to use them, so it doesn't waste steps on tools it can't actually call.)
Summary
menu_toolis fully implemented and documented as the required way to interact with<select>dropdowns, but it's missing fromBUILTIN_TOOLS, so the agent calls it (per its own system prompt) and getsTool 'menu_tool' not found. The same gap affectsupload_toolandhuman_tool.Root cause
src/agent/tools/service.py:255-256defines and decoratesmenu_toolwith@Tool('menu_tool', model=Menu)— it's a real, working tool.src/agent/context/prompt/system.mdexplicitly tells the agent to use it: e.g. line 71 ("menu_tool — Selects one or more options from a<select>dropdown by their visible label text.") and line 97 ("For dropdown menus (<select>elements), Web-Use usesmenu_tool— notclick_tool.").src/agent/tools/__init__.py'sBUILTIN_TOOLSlist only includes:menu_tool,upload_tool, andhuman_toolare all imported into that file but never added toBUILTIN_TOOLS, even though the system prompt documents and instructs their use throughout (dropdown selection, file uploads, CAPTCHA/OTP/human-in-the-loop escalation).Reproduction
Ran the CLI against a real
<select>dropdown (a county document-search portal requiring a document-type selection):Relevant log excerpt:
The agent then fell back to injecting raw JavaScript to set the
<select>value directly, which introduced its own bug (unescaped apostrophe in the option label broke the generated script string), and eventually exhausted its step budget without completing.An earlier run against a different portal also hit the same gap for
human_tool:Impact
Any task that needs to select from a
<select>dropdown, upload a file, or escalate to a human (CAPTCHA/OTP) will fail, because the agent is instructed by its own system prompt to use tools that were never registered. The agent has no way to discover this ahead of time and burns its step budget on broken workarounds (JS injection, repeated retries) before giving up.Suggested fix
Add the three already-implemented tools to
BUILTIN_TOOLSinsrc/agent/tools/__init__.py:(If any of the three are intentionally excluded — e.g.
human_toolneeding a UI callback not available in headless/CLI mode — the system prompt should stop instructing the agent to use them, so it doesn't waste steps on tools it can't actually call.)