Skip to main content
Glama
owen-lacey

FPL MCP Server

by owen-lacey

Get Player Data

getPlayerData

Fetch comprehensive Fantasy Premier League player statistics and performance data to analyze team selections and track player form.

Instructions

Fetch all player data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/server.ts:185-199 (registration)
    Registration of the MCP tool 'getPlayerData' including inline input schema (empty object) and the thin handler wrapper that calls the helper function and formats response as JSON text content.
    server.registerTool("getPlayerData", {
      title: "Get Player Data",
      description: "Fetch all player data",
      inputSchema: {}
    }, async () => {
      const data = await getPlayerData();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    });
  • Core handler logic for fetching player data (elements) from FPL bootstrap-static API, returning a partial FplApiObject.
    export async function getPlayerData(): Promise<Partial<FplApiObject>> {
      const data = await getBootstrapStatic();
      return {
        elements: data.elements,
      };
    }
  • Helper function called by getPlayerData to fetch the full bootstrap-static data from FPL API.
    export async function getBootstrapStatic(): Promise<FplApiObject> {
      const res = await fetch('https://fantasy.premierleague.com/api/bootstrap-static/');
      return res.json() as Promise<FplApiObject>;
    }
  • TypeScript interface defining the structure of FPL API response object, used in getPlayerData return type.
    export interface FplApiObject {
      chips: Partial<Chip>[];
      events: Partial<Event>[];
      element_types: Partial<ElementType>[];
      teams: Partial<Team>[];
      elements: Partial<Element>[];
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Fetch all player data' implies a read-only operation, but it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the data is in. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 with no wasted words. It's front-loaded with the core action and resource, making it highly concise and well-structured for quick understanding.

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 'all player data' (which could involve large datasets), no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like data format, pagination, or error handling, leaving the agent with insufficient context for reliable 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, which is appropriate here. Baseline is 4 for 0 parameters, as the schema fully handles the lack of inputs.

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 player data' clearly states the verb ('fetch') and resource ('player data'), making the purpose understandable. However, it doesn't distinguish this tool from its many siblings (e.g., getTeamData, getEntry, getElementSummary), which also fetch different types of data, so it lacks sibling differentiation.

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 15 sibling tools on the server, including getTeamData and getElementSummary, there's no indication of what 'player data' encompasses or when it's preferred over other data-fetching tools.

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