Skip to main content
Glama
watamoo

Crossword MCP Server

by watamoo

get_candidates

Retrieve registered candidate words for a crossword clue ID to support puzzle solving by accessing previously stored answer possibilities.

Instructions

登録済みの候補語リストを取得する。

Args: clue_id (str): 取得対象のカギ ID。事前に register_candidates で候補を登録して いる必要がある。

Returns: list[str]: 登録済み候補語のリスト。登録時に渡した文字列を順序どおりに返す。

Raises: ValueError: clue_id が空の場合。 KeyError: 指定した clue_id の候補が未登録の場合。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clue_idYes

Implementation Reference

  • The @mcp.tool() decorator registers the async handler function get_candidates, which retrieves and returns the list of candidates registered for the specified clue_id from the global PuzzleState.
    @mcp.tool()
    async def get_candidates(clue_id: str) -> list[str]:
        """登録済みの候補語リストを取得する。
    
        Args:
            clue_id (str): 取得対象のカギ ID。事前に `register_candidates` で候補を登録して
                いる必要がある。
    
        Returns:
            list[str]: 登録済み候補語のリスト。登録時に渡した文字列を順序どおりに返す。
    
        Raises:
            ValueError: `clue_id` が空の場合。
            KeyError: 指定した `clue_id` の候補が未登録の場合。
        """
    
        if not clue_id:
            raise ValueError("clue_id は必須です。")
    
        clue_id = clue_id.strip()
        if clue_id not in state.candidates:
            raise KeyError("指定された clue_id の候補が登録されていません。")
    
        return state.candidates[clue_id]

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/watamoo/mcp-crossword-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server