Skip to main content
Glama

romm_stats

Retrieve library statistics including platform counts, ROM totals, save files, and storage usage for game collection management.

Instructions

Get library statistics — platform count, ROM count, saves, total size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `romm_stats` function is decorated with `@mcp.tool()` and implements the logic to fetch and format statistics from the RomM API's `/stats` endpoint.
    async def romm_stats() -> str:
        """Get library statistics — platform count, ROM count, saves, total size."""
        data = await _get("stats")
    
        if not isinstance(data, dict):
            return "No stats available."
    
        lines = ["RomM Library Statistics:\n"]
        lines.append(f"  Platforms: {data.get('PLATFORMS', 0)}")
        lines.append(f"  ROMs: {data.get('ROMS', 0)}")
        lines.append(f"  Saves: {data.get('SAVES', 0)}")
        lines.append(f"  Save states: {data.get('STATES', 0)}")
        lines.append(f"  Screenshots: {data.get('SCREENSHOTS', 0)}")
        total = data.get("TOTAL_FILESIZE_BYTES", 0)
        if total:
            lines.append(f"  Total size: {_fmt_size(total)}")
    
        return "\n".join(lines)

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