Skip to main content
Glama
leynier
by leynier

open_urls

Open multiple URLs simultaneously in the default browser using MCP System Bridge. Streamline web navigation by processing a list of links efficiently.

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 takes a list of URLs, validates and opens each in the default browser using webbrowser.open(), returning a dictionary mapping each URL to success or error message.
    @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

Other Tools

Related Tools

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