romm_platforms
List available gaming platforms with their ROM counts to help users organize and manage their game collections effectively.
Instructions
List platforms with ROM counts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:359-384 (handler)Implementation of the romm_platforms tool, which fetches platform data and formats it into a list of strings showing ROM counts, sizes, and platform IDs.
async def romm_platforms() -> str: """List platforms with ROM counts.""" data = await _get("platforms") if not isinstance(data, list): return "No platforms found." platforms = sorted(data, key=lambda p: p.get("rom_count", 0), reverse=True) if not platforms: return "No platforms found." lines = [f"Platforms ({len(platforms)}):\n"] for p in platforms: name = p.get("display_name") or p.get("name", "Unknown") slug = p.get("slug", "?") count = p.get("rom_count", 0) size = p.get("fs_size_bytes", 0) pid = p.get("id", "?") line = f" {name} ({slug})" line += f" — {count} ROM{'s' if count != 1 else ''}" if size: line += f", {_fmt_size(size)}" lines.append(line) lines.append(f" ID: {pid}") return "\n".join(lines)