Skip to main content
Glama
watamoo
by watamoo

get_candidates

Retrieve registered candidate words for crossword clues using the clue ID to access previously stored word options for puzzle solving.

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 handler function for the 'get_candidates' MCP tool. It validates the clue_id and returns the list of registered candidate words from the shared PuzzleState.candidates dictionary. The @mcp.tool() decorator registers it as an MCP tool.
    @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