Skip to main content
Glama

open_uri

Initiate actions on an Android device by opening a specified URI directly, enabling quick access to resources or functionalities.

Instructions

Open a URI on the connected Android device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYes

Implementation Reference

  • The handler function for the 'open_uri' tool. It is decorated with @mcp.tool(), which registers it with the FastMCP server. The function executes an adb shell command to open the specified URI on the connected Android device, returning a success message or raising an error.
    @mcp.tool() def open_uri(uri: str) -> str: """Open a URI on the connected Android device""" result = subprocess.run( ["adb", "shell", "am", "start", "-a", "android.intent.action.VIEW", "-d", uri], capture_output=True, text=True, ) if result.returncode != 0: raise RuntimeError(f"Error opening URI '{uri}': {result.stderr}") return f"URI '{uri}' has been opened successfully."

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/vs4vijay/espresso-mcp'

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