Skip to main content
Glama
owen-lacey

FPL MCP Server

by owen-lacey

Get League Standings

getLeagueStandings

Retrieve Fantasy Premier League standings by league ID to view team rankings and performance data.

Instructions

Fetch information about a league by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
leagueIdYes

Implementation Reference

  • MCP tool handler function for getLeagueStandings that calls the helper function and returns the data as JSON text content.
    }, async ({ leagueId }) => {
      const data = await getLeagueStandings(leagueId);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    });
  • Zod input schema defining leagueId as a required number.
    inputSchema: { leagueId: z.number() }
  • src/server.ts:118-132 (registration)
    Registration of the getLeagueStandings tool with the MCP server, including metadata, schema, and handler.
    server.registerTool("getLeagueStandings", {
      title: "Get League Standings",
      description: "Fetch information about a league by ID",
      inputSchema: { leagueId: z.number() }
    }, async ({ leagueId }) => {
      const data = await getLeagueStandings(leagueId);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data)
          }
        ]
      };
    });
  • Core helper function that performs the HTTP fetch to the FPL API for league standings.
    export async function getLeagueStandings(leagueId: number): Promise<any> {
      const res = await fetch(`https://fantasy.premierleague.com/api/leagues-classic/${leagueId}/standings/`);
      return res.json();
    }
Behavior1/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. It only states the basic action ('fetch') without mentioning any traits like rate limits, authentication needs, error handling, or what the output entails (e.g., format, pagination). This leaves critical behavioral aspects undocumented.

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, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently states the core action without unnecessary elaboration, earning full marks for brevity and structure.

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

Completeness1/5

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

Given the tool's complexity (a read operation with one parameter) and the absence of annotations and output schema, the description is incomplete. It doesn't cover behavioral traits, parameter details, or return values, leaving significant gaps for the agent to understand and use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond the input schema, which has 0% description coverage. It doesn't explain what 'leagueId' represents (e.g., numeric ID format, source), its constraints, or examples. With one required parameter undocumented, the description fails to compensate for the schema's lack of detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Fetch information about a league by ID' states the action (fetch) and resource (league) but is vague about what specific information is retrieved. It doesn't differentiate from sibling tools like 'getLeagueStandingsPage' which likely serves a similar purpose, making it unclear what distinguishes this tool from its alternatives.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives. With sibling tools like 'getLeagueStandingsPage' and 'getBestClassicPrivateLeagues' that might overlap in functionality, the description offers no context on use cases, prerequisites, or exclusions, leaving the agent without direction.

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