Descriptions are critically short (9-26 chars, baseline 194 chars). LLMs cannot determine when to use a tool or how it differs from similar tools. Examples: 'Navigate to a URL in the active Chrome tab' (45 chars) is barely adequate; 'Read the text content of the current page' (41 chars) lacks context on format (plain text? HTML? markdown?).
Expand all tool descriptions to 100-200 characters. Include: WHAT the tool does, WHEN to use it (vs. similar tools), WHAT it returns, and any PREREQUISITES. Example for click: 'Click a DOM element by CSS selector. Use after query_dom() to verify the element exists. Returns success/failure and the element's text content. Prerequisite: the selector must be valid CSS.'
Add complete output schemas to every tool. Document field names, types, and meanings. Example for get_tabs: {"tabs": [{"id": "number", "url": "string", "title": "string", "active": "boolean"}], "count": "number"}
Declare parameter constraints as enums where appropriate. For modify_dom.action, define: {"enum": ["setText", "setHTML", "setAttribute", "removeClass", "addClass"]}. For get_storage.type: {"enum": ["local", "session"]}.
Add detailed parameter descriptions that include format, constraints, and examples (without example values). Example: 'CSS selector (standard W3C syntax: class selectors (.name), ID selectors (#id), attribute selectors ([attr=value]). Pseudo-elements and pseudo-classes are not supported.)'
Add error recovery guidance to descriptions. Example for click: 'If this fails, the selector may not match the current DOM. Call query_dom() first to verify the element exists, then use a more specific selector.'
Add confirmation patterns or dry-run support for destructive tools (execute_js, modify_dom, inject_css, navigate, set_storage). Example: Add an optional 'confirm' parameter that returns a preview instead of executing.
execute_js accepts arbitrary JavaScript code with no validation, sandboxing, or warning. This is an uncontrolled code execution vector. An LLM could be tricked into running malicious scripts (data theft, privilege escalation, etc.). Missing: validation, timeout protection, scope limitation, and explicit security warning in description.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required data. Examples: Does get_tabs return tab_id, tab_url, tab_title? Does read_page return plaintext or HTML? Does accessibility_audit return a list of issues or a summary score? This forces LLMs to hallucinate output shapes.
Destructive operations (modify_dom, inject_css, navigate, create_tab, set_storage) lack confirmation patterns or warnings. An agent could accidentally overwrite critical DOM, corrupt CSS, redirect users, or pollute storage without human approval. Missing: dry-run support, confirmation_required flag, or explicit warnings in descriptions.
No permission gates or scope declarations. Tools operate with all Chrome permissions without per-user or per-agent authorization checks. Missing: permission validation, audit logging, rate limiting, and scope annotations. An agent could read all storage, intercept all network traffic, or inject code into any tab.
Parameter descriptions are missing or trivial. Most parameters have only a 1-2 sentence description (e.g., 'CSS selector of element to click'). Missing: format constraints, valid value ranges, required context, and disambiguation from similar parameters. Example: 'selector' appears in 15+ tools but is never described in detail (class selectors? attribute selectors? pseudo-elements?).
No error guidance or recovery instructions. If a tool fails, the LLM has no actionable next step. Missing: error classification (retryable vs. fatal), suggested corrections, and downstream fallbacks. Example: If click fails because selector doesn't match, what should the LLM try? Call query_dom first? Try a different selector? Unclear.
Overlapping tool functionality without clear composition guidance. Examples: screenshot vs. full_page_screenshot (when to use which?), query_dom vs. read_page (difference unclear), get_page_info vs. read_page (overlap undefined). LLMs will waste reasoning cycles choosing between them. Missing: clear descriptions of when each tool is appropriate.
modify_dom 'action' parameter accepts free-form strings ('setText', 'setHTML', 'setAttribute', etc.) but is NOT declared as an enum. LLMs will hallucinate invalid actions like 'delete', 'toggle', 'prepend'. Should be: {"type": "string", "enum": ["setText", "setHTML", "setAttribute", "removeClass", "addClass"]}
get_storage 'type' parameter ('local' or 'session') is not declared as an enum. LLMs may pass 'browser', 'temp', or other invalid values. Should be strictly constrained.
No pagination support documented. Tools returning lists (get_tabs, check_links, accessibility_audit) have no page/offset/limit parameters. If a user has 100+ tabs or broken links, the agent has no way to paginate. LLMs will receive truncated or massive results, risking context window exhaustion.
get_tabscheck_linksaccessibility_audit
Add permission gates. Implement per-agent authorization checks before executing any tool. Document required permissions in each tool description (e.g., 'Requires: read:dom, write:dom').
Add audit logging. Log tool invocations with: caller ID, timestamp, tool name, parameters (excluding secrets), and result/error. This enables compliance and incident response.
Add structured error responses with categorization (retryable, user-fixable, fatal) and actionable guidance. Example: {"error": "Selector not found: '.submit-button'", "category": "retryable", "suggestion": "Call query_dom() with a broader selector to find the element first."}
Sandbox execute_js with strict constraints: no file I/O, no fetch/XHR to arbitrary domains, no console.log loops, execution timeout (e.g., 5 seconds), and explicit security warning in description.
Consolidate overlapping tools. Either: (a) merge screenshot + full_page_screenshot into one tool with a 'full_page' parameter, (b) clarify in descriptions when to use each (screenshot: 'visible viewport only', full_page: 'entire rendered page, may require scrolling').
Add pagination to get_tabs, check_links, and accessibility_audit. Include optional limit (default 20) and offset/cursor parameters. Return a total_count so the agent knows if more results exist.
Add tool annotations (readOnlyHint, destructiveHint, idempotentHint) to help clients understand tool semantics. Example: execute_js should have destructiveHint=true.
Document dependencies between tools in descriptions. Example: 'Before calling click(), use query_dom() to verify the element exists on the current page.'
Add a 'get_dom_structure' or 'describe_page' tool that returns a summary of page structure (headings, forms, buttons, etc.) so agents can plan interactions without trial-and-error selectors.