Skip to main content
Glama

romm_search

Search for ROMs by name across your game library, with optional filtering by platform and result limits.

Instructions

Search ROMs by name across the library.

query: Search term (required). platform_id: Filter to a single platform (0 = all). limit: Max results (default 20).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
platform_idNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the `romm_search` tool, which searches for ROMs using a query, platform ID, and limit, and returns a formatted string of results.
    async def romm_search(query: str, platform_id: int = 0, limit: int = 20) -> str:
        """Search ROMs by name across the library.
    
        query: Search term (required).
        platform_id: Filter to a single platform (0 = all).
        limit: Max results (default 20).
        """
        params: dict = {
            "search_term": query,
            "limit": min(limit, 100),
            "offset": 0,
            "order_by": "name",
            "order_dir": "asc",
        }
        if platform_id:
            params["platform_ids"] = platform_id
    
        data = await _get("roms", params=params, long_timeout=True)
    
        items = []
        if isinstance(data, dict):
            items = data.get("items", [])
        elif isinstance(data, list):
            items = data
    
        if not items:
            return f"No ROMs found matching \"{query}\"."
    
        lines = [f"Search results for \"{query}\" ({len(items)} found):\n"]
        for i, rom in enumerate(items, 1):
            name = rom.get("name", "Unknown")
            platform = rom.get("platform_display_name") or rom.get("platform_slug", "?")
            size = rom.get("fs_size_bytes", 0)
            rom_id = rom.get("id", "?")
    
            line = f"  {i}. {name} [{platform}]"
            if size:
                line += f" — {_fmt_size(size)}"
            lines.append(line)
            lines.append(f"     ID: {rom_id}")
    
        return "\n".join(lines)
  • server.py:565-565 (registration)
    Registration of the `romm_search` tool using the @mcp.tool() decorator.
    @mcp.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool searches by name across the library, but doesn't describe key behaviors like whether it's read-only (implied by 'Search'), how results are returned (though an output schema exists), error handling, or performance aspects like rate limits. For a search tool with no annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured. The first sentence states the purpose clearly, followed by bullet-like explanations for each parameter. Every sentence adds value without redundancy, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is somewhat complete. It covers the purpose and parameters adequately, and the output schema likely handles return values. However, it lacks behavioral context (e.g., search semantics, error cases) and usage guidelines relative to siblings, leaving room for improvement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics for all three parameters: 'query' as a required search term, 'platform_id' for filtering (with 0 = all), and 'limit' for max results with a default. This clarifies beyond the bare schema types, though it doesn't detail format constraints (e.g., query syntax).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search ROMs by name across the library.' It specifies the verb ('Search'), resource ('ROMs'), and scope ('by name across the library'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'romm_search_by_hash' or 'romm_library_items', which could provide similar functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'romm_search_by_hash' (likely for hash-based searches) and 'romm_library_items' (possibly for listing items), there's no indication of when this name-based search is preferred or what prerequisites might be needed. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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