Skip to main content
Glama

getLeagueStandingsPage

Retrieve a specific page of league standings for Fantasy Premier League competitions with over 50 teams by providing league ID and page number.

Instructions

Fetch a page of league standings for leagues with more than 50 teams

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
leagueIdYes
pageYes

Implementation Reference

  • The core handler function implementing the tool logic: fetches the paginated league standings page from the Fantasy Premier League API.
    export async function getLeagueStandingsPage(leagueId: number, page: number): Promise<any> { const res = await fetch(`https://fantasy.premierleague.com/api/leagues-classic/${leagueId}/standings/?page_standings=${page}`); return res.json(); }
  • src/server.ts:135-149 (registration)
    MCP tool registration for 'getLeagueStandingsPage', including title, description, Zod input schema, and thin wrapper handler that invokes the core function and returns formatted response.
    server.registerTool("getLeagueStandingsPage", { title: "Get League Standings Page", description: "Fetch a page of league standings for leagues with more than 50 teams", inputSchema: { leagueId: z.number(), page: z.number() } }, async ({ leagueId, page }) => { const data = await getLeagueStandingsPage(leagueId, page); return { content: [ { type: "text", text: JSON.stringify(data) } ] }; });
  • Zod schema defining input parameters: leagueId (number) and page (number).
    inputSchema: { leagueId: z.number(), page: z.number() }

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