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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:1005-1022 (handler)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