Skip to main content
Glama
leynier
by leynier

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
NameRequiredDescriptionDefault
urlsYes

Implementation Reference

  • 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leynier/mcp-sys-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server