open_urls
Opens multiple URLs in your default browser to access web resources quickly. Use this tool to launch several web pages at once for research, monitoring, or workflow tasks.
Instructions
Open a list of URLs in the default browser.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes |
Implementation Reference
- src/server.py:19-38 (handler)The handler function for the 'open_urls' tool. It validates and opens each URL in the default browser using webbrowser.open, handling errors and adding scheme if missing, returning a dict of results for each URL.@mcp.tool(annotations=ToolAnnotations(readOnlyHint=True)) def open_urls(urls: list[str]) -> dict[str, str]: """ Open a list of URLs in the default browser. """ results = {} for url in urls: parsed_url = urlparse(url) if not parsed_url.scheme: parsed_url = urlparse(f"https://{url}") if not parsed_url.netloc: results[url] = "Error: Invalid URL. Please provide a valid URL." continue processed_url = urlunparse(parsed_url) try: webbrowser.open(processed_url) results[url] = "URL opened successfully." except Exception as e: results[url] = f"Error opening URL: {e}" return results