Skip to main content
Glama
owen-lacey

FPL MCP Server

by owen-lacey

Get Gameweek Data

getGameweekData

Fetch comprehensive gameweek data from Fantasy Premier League, including fixtures, player statistics, and league standings for analysis and decision-making.

Instructions

Fetch all gameweek data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that fetches the FPL bootstrap-static API and returns the events (gameweek data) as Partial<FplApiObject>.
    export async function getGameweekData(): Promise<Partial<FplApiObject>> {
      const data = await getBootstrapStatic();
      return {
        events: data.events,
      };
    }
  • src/server.ts:217-231 (registration)
    Registers the "getGameweekData" MCP tool, specifying title, description, empty input schema (no parameters), and an inline handler that invokes getGameweekData() and formats the response as MCP content.
    server.registerTool("getGameweekData", {
      title: "Get Gameweek Data",
      description: "Fetch all gameweek data",
      inputSchema: {}
    }, async () => {
      const data = await getGameweekData();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    });
  • TypeScript interface defining the structure of FplApiObject, used in the return type of getGameweekData (Partial<FplApiObject> with events).
    export interface FplApiObject {
      chips: Partial<Chip>[];
      events: Partial<Event>[];
      element_types: Partial<ElementType>[];
      teams: Partial<Team>[];
      elements: Partial<Element>[];
    }
  • Helper function that fetches the full FPL bootstrap-static data, called by getGameweekData to retrieve the events.
    export async function getBootstrapStatic(): Promise<FplApiObject> {
      const res = await fetch('https://fantasy.premierleague.com/api/bootstrap-static/');
      return res.json() as Promise<FplApiObject>;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'fetch all gameweek data' but doesn't disclose behavioral traits such as whether this is a read-only operation, potential rate limits, authentication needs, or what 'all' entails (e.g., pagination, scope). This leaves significant gaps in understanding the tool's behavior.

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 a single, efficient sentence ('Fetch all gameweek data') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of fetching data (likely involving multiple gameweeks or details), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'gameweek data' includes, the return format, or any constraints, leaving the agent with insufficient context for effective use.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, but since there are no parameters, this is acceptable. A baseline of 4 is appropriate as it doesn't need to compensate for any gaps.

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 'Fetch all gameweek data' clearly states the action (fetch) and resource (gameweek data), making the purpose understandable. It doesn't explicitly differentiate from sibling tools like 'getFixturesForGameweek' or 'getLiveEvent', which might also relate to gameweeks, so it misses full sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'getFixturesForGameweek' and 'getLiveEvent' that might overlap in context, there's no indication of when this tool is appropriate or when to choose another, leaving usage unclear.

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/owen-lacey/fpl-mcp'

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