Skip to main content
Glama
Ronnietag
by Ronnietag

app_launch

Launch desktop applications by name on Linux systems to open programs like Firefox or GNOME Terminal directly from AI assistants.

Instructions

Launch a desktop application by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_nameYesApplication name (e.g., 'firefox', 'gnome-terminal')

Implementation Reference

  • The actual implementation of the app_launch tool logic.
    def execute_app_launch(app_name: str) -> str:
        """Launch a desktop application."""
        try:
            # Try common launch methods
            subprocess.Popen(
                [app_name],
                stdout=subprocess.DEVNULL,
                stderr=subprocess.DEVNULL,
            )
            return f"Launched: {app_name}"
        except FileNotFoundError:
            # Try with xdg-open as fallback
            try:
                subprocess.Popen(
                    ["xdg-open", app_name],
                    stdout=subprocess.DEVNULL,
                    stderr=subprocess.DEVNULL,
                )
                return f"Launched via xdg-open: {app_name}"
            except Exception as e:
                return f"Error: Could not launch '{app_name}': {e}"
  • Registration of the app_launch tool with its schema definition.
    register_tool(
        name="app_launch",
        scope=PermissionLevel.SAFE,
        description="Launch a desktop application by name",
        params_schema={
            "type": "object",
            "properties": {
                "app_name": {"type": "string", "description": "Application name (e.g., 'firefox', 'gnome-terminal')"},
            },
            "required": ["app_name"],
        },
    )

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/Ronnietag/linux-mcp'

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