navigate
Navigate to a specific URL to begin or continue web application testing with automated verification.
Instructions
Navigate to a specific URL.
Args: url: The URL to navigate to
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- argus/mcp_server.py:384-401 (handler)The navigate tool handler: takes a URL, navigates the browser to it via goto(), updates session state (steps, elements, pages_visited), and returns the resulting page URL, title, and element count.
@mcp.tool() async def navigate(url: str) -> str: """Navigate to a specific URL. Args: url: The URL to navigate to """ s = _require_session() step = f"Navigate to {url}" s.steps.append(step) await s.browser.goto(url) state = await s.browser.get_state() s._last_elements = state.elements if state.url not in s.pages_visited: s.pages_visited.append(state.url) return f"Navigated to {state.url} — {state.title} ({len(state.elements)} elements)" - argus/mcp_server.py:384-384 (registration)Registration of the navigate tool using the @mcp.tool() decorator on the async function.
@mcp.tool() - argus/mcp_server.py:142-145 (helper)Helper function that ensures an active session exists before the navigate tool can be used.
def _require_session() -> Session: if not _session.active: raise RuntimeError("No active session. Call start_session(url) first.") return _session - argus/mcp_server.py:386-389 (schema)Schema/input definition: the tool accepts a single 'url' string parameter.
"""Navigate to a specific URL. Args: url: The URL to navigate to