Skip to main content
Glama
cr2007

Wordle MCP (Python)

by cr2007

get_wordle_solution

Read-only

Retrieve the Wordle solution for any date from May 19, 2021 to 23 days in the future. Access historical and upcoming daily word answers by specifying your target date.

Instructions

Fetches the Wordle of a particular date provided between 2021-05-19 to 23 days future

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_dateNo2026-04-05

Implementation Reference

  • The main handler function get_wordle_data that executes the tool logic. It makes an HTTP GET request to the NYT Wordle API for the specified date and returns the JSON response containing the Wordle solution.
    async def get_wordle_data(
        target_date: str = date.today().isoformat(),
    ) -> Union[WordleAPIData, WordleError]:
        """
        Retrieves Wordle puzzle data for a specified date.
    
        This function fetches the complete Wordle solution and associated metadata
        for any given date within the supported range. You may provide the word, as well as
        the definition too, if needed.
    
        Args:
            date (str, optional): Target date in YYYY-MM-DD format. If not provided,
                defaults to the current date.
    
        Returns:
            dict: JSON response containing:
                - solution: The 5-letter Wordle answer
                - puzzle_id: Sequential puzzle number
                - metadata: Additional puzzle information (editor, days since launch, etc.)
    
        Note:
            - Date format must be YYYY-MM-DD (ISO 8601)
            - Available date range: 2021-05-19 (Wordle launch) to 23 days future
            - Returns error for dates outside supported range
        """
    
        url: str = f"https://www.nytimes.com/svc/wordle/v2/{target_date}.json"
    
        # Make the GET request to the Wordle API
        return requests.get(url, timeout=300).json()
  • The tool registration using @mcp.tool() decorator. Registers the tool with name='get_wordle_solution', description about the date range, and readOnlyHint annotation.
    @mcp.tool(
        name="get_wordle_solution",
        description=(
            "Fetches the Wordle of a particular date provided "
            "between 2021-05-19 to 23 days future"
        ),
        annotations={"readOnlyHint": True},
    )
  • Type definitions for the tool's input/output. WordleAPIData defines the successful response structure with solution, id, print_date, days_since_launch, and editor fields. WordleError defines the error response structure.
    class WordleAPIData(TypedDict):
        id:                int
        solution:          str
        print_date:        str
        days_since_launch: int
        editor:            str
    
    
    class WordleError(TypedDict):
        status: str
        errors: list[str]
        results: list
Behavior3/5

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

Annotations declare readOnlyHint=true, establishing this is a safe read operation. The description adds the date range constraint (2021-05-19 to 23 days future), which is useful behavioral context not captured in annotations. It does not disclose rate limits, error cases, or return format.

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

Conciseness4/5

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

Single sentence contains essential information (verb, resource, constraint) with minimal waste. Minor grammatical awkwardness ('to 23 days future' rather than 'into the future') slightly impacts clarity but not comprehension.

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?

For a single-parameter read-only tool, the description covers the essential operation and input constraints. However, it omits the expected date format (ISO 8601 implied by default value but not stated) and provides no information about the return value structure (absent output_schema).

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?

With 0% schema description coverage, the description compensates well by clarifying that the parameter represents a 'particular date' and specifying its valid range ('between 2021-05-19 to 23 days future'), giving clear semantics to the target_date parameter despite the schema providing only type and title.

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 uses a specific verb ('Fetches') and resource ('the Wordle'), and adds the critical scope constraint (specific date range). While it doesn't explicitly say 'solution' or 'answer', 'Fetches the Wordle' combined with the tool name makes the purpose clear.

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 the valid date range constraint ('between 2021-05-19 to 23 days future'), which functions as an input guideline. However, it lacks explicit 'when to use' guidance, error handling notes, or alternatives (though no siblings exist).

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/cr2007/mcp-wordle-python'

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