Skip to main content
Glama

romm_scan_library

Trigger a library rescan to discover new ROMs and platforms. This background task updates your collection as it scans.

Instructions

Trigger a library rescan to discover new ROMs and platforms.

This is a background task — it returns immediately. New ROMs will appear in the library as the scan progresses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The romm_scan_library tool handler which triggers a POST request to the RomM tasks API to scan the library.
    @mcp.tool()
    async def romm_scan_library() -> str:
        """Trigger a library rescan to discover new ROMs and platforms.
    
        This is a background task — it returns immediately. New ROMs will appear
        in the library as the scan progresses.
        """
        try:
            data = await _post("tasks/run/scan_library", long_timeout=True)
            if isinstance(data, dict):
                job_id = data.get("id", "")
                status = data.get("status", "started")
                return f"Library scan triggered (job: {job_id}, status: {status})."
            return "Library scan triggered."
        except RuntimeError as e:
            if "422" in str(e) or "not enabled" in str(e).lower():
                return "Library scan task is not enabled in RomM settings. Enable scheduled rescan first."
            raise

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/lodordev/mcp-romm'

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