Skip to main content
Glama

Fantasy Premier League MCP Server

get_gameweek_status

Retrieve precise details about current, previous, and upcoming gameweeks in Fantasy Premier League, including exact timing and status, to plan and manage your FPL strategy effectively.

Instructions

Get precise information about current, previous, and next gameweeks

Returns: Detailed information about gameweek timing, including exact status

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "title": "get_gameweek_statusArguments", "type": "object" }

Implementation Reference

  • The main handler function for the 'get_gameweek_status' MCP tool. It fetches gameweeks data from the API, determines current/previous/next gameweeks, calculates the precise status of the current gameweek (Not Started, Upcoming, Imminent, In Progress, Complete), and returns structured information including deadlines and season progress.
    @mcp.tool() async def get_gameweek_status() -> Dict[str, Any]: """Get precise information about current, previous, and next gameweeks Returns: Detailed information about gameweek timing, including exact status """ gameweeks = await api.get_gameweeks() # Find current, previous, and next gameweeks current_gw = next((gw for gw in gameweeks if gw.get("is_current")), None) previous_gw = next((gw for gw in gameweeks if gw.get("is_previous")), None) next_gw = next((gw for gw in gameweeks if gw.get("is_next")), None) # Determine exact current gameweek status current_status = "Not Started" if current_gw: deadline = datetime.datetime.strptime(current_gw["deadline_time"], "%Y-%m-%dT%H:%M:%SZ") now = datetime.datetime.utcnow() if now < deadline: current_status = "Upcoming" time_until = deadline - now hours_until = time_until.total_seconds() / 3600 if hours_until < 24: current_status = "Imminent (< 24h)" else: if current_gw.get("finished"): current_status = "Complete" else: current_status = "In Progress" return { "current_gameweek": current_gw and current_gw["id"], "current_status": current_status, "previous_gameweek": previous_gw and previous_gw["id"], "next_gameweek": next_gw and next_gw["id"], "season_progress": f"GW {current_gw and current_gw['id']}/38" if current_gw else "Unknown", "exact_timing": { "current_deadline": current_gw and current_gw["deadline_time"], "next_deadline": next_gw and next_gw["deadline_time"] } }

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/rishijatia/fantasy-pl-mcp'

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