Skip to main content
Glama

romm_search_by_hash

Identify ROM files using CRC32, MD5, or SHA1 hash values to verify authenticity and retrieve metadata.

Instructions

Identify a ROM by file hash. Provide at least one hash value.

crc_hash: CRC32 hash string. md5_hash: MD5 hash string. sha1_hash: SHA1 hash string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
crc_hashNo
md5_hashNo
sha1_hashNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function 'romm_search_by_hash' processes hash parameters, queries the 'roms/by-hash' endpoint, and formats the result.
    async def romm_search_by_hash(
        crc_hash: str = "",
        md5_hash: str = "",
        sha1_hash: str = "",
    ) -> str:
        """Identify a ROM by file hash. Provide at least one hash value.
    
        crc_hash: CRC32 hash string.
        md5_hash: MD5 hash string.
        sha1_hash: SHA1 hash string.
        """
        params: dict = {}
        if crc_hash:
            params["crc_hash"] = crc_hash.strip()
        if md5_hash:
            params["md5_hash"] = md5_hash.strip()
        if sha1_hash:
            params["sha1_hash"] = sha1_hash.strip()
    
        if not params:
            return "At least one hash value is required (crc_hash, md5_hash, or sha1_hash)."
    
        data = await _get("roms/by-hash", params=params)
    
        if not isinstance(data, dict) or "id" not in data:
            return f"No ROM found matching the provided hash."
    
        name = data.get("name", "Unknown")
        platform = data.get("platform_display_name") or data.get("platform_slug", "?")
        rom_id = data.get("id", "?")
        size = data.get("fs_size_bytes", 0)
    
        lines = ["Match found:\n"]
        lines.append(f"  {name} [{platform}]")
        if size:
            lines.append(f"  Size: {_fmt_size(size)}")
        lines.append(f"  ID: {rom_id}")
    
        return "\n".join(lines)
  • server.py:610-610 (registration)
    The tool is registered using the '@mcp.tool()' decorator on the handler function.
    @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. It states the tool identifies a ROM, implying a read operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what happens if no match is found. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 front-loaded with the core purpose, followed by parameter details. Every sentence earns its place: the first sets the context, and the next three explain each parameter succinctly. It's appropriately sized with zero waste.

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 has an output schema (which handles return values), the description covers the purpose and parameters well. However, with no annotations and a read operation implied, it lacks context on behavioral aspects like permissions or error cases. It's adequate but has clear gaps in completeness for a tool with zero annotation coverage.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must compensate. It does so effectively by explaining all three parameters: 'crc_hash: CRC32 hash string.', 'md5_hash: MD5 hash string.', and 'sha1_hash: SHA1 hash string.' This adds clear meaning beyond the bare schema, specifying hash types and formats.

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: 'Identify a ROM by file hash.' It specifies the verb 'identify' and the resource 'ROM,' and distinguishes it from sibling tools like 'romm_search' by focusing on hash-based identification. However, it doesn't explicitly contrast with all siblings (e.g., 'romm_get_item'), so it's not a perfect 5.

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

Usage Guidelines3/5

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

The description provides some usage guidance: 'Provide at least one hash value.' This implies when to use it (when you have hash data) and sets a prerequisite. However, it lacks explicit alternatives (e.g., when to use this vs. 'romm_search' or 'romm_get_item') and doesn't specify exclusions, so it's not fully comprehensive.

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