Skip to main content
Glama

getEntryPicks

Fetch a Fantasy Premier League team's squad selections for a specific gameweek using entry ID and week number.

Instructions

Fetch squad picks of a team for a specific week

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entryIdYes
gwYes

Implementation Reference

  • The core handler function that fetches the Fantasy Premier League API endpoint for a manager's (entry) squad picks in a specific gameweek (gw). This is the primary implementation of the tool logic.
    export async function getEntryPicks(entryId: number, gw: number): Promise<any> { const res = await fetch(`https://fantasy.premierleague.com/api/entry/${entryId}/event/${gw}/picks/`); return res.json(); }
  • Zod-based input schema defining the required parameters: entryId (manager/team ID) as number, gw (gameweek) as number.
    inputSchema: { entryId: z.number(), gw: z.number() }
  • src/server.ts:101-115 (registration)
    MCP tool registration including title, description, schema, and thin wrapper handler that invokes the core getEntryPicks function and formats the response as MCP content.
    server.registerTool("getEntryPicks", { title: "Get Entry Picks", description: "Fetch squad picks of a team for a specific week", inputSchema: { entryId: z.number(), gw: z.number() } }, async ({ entryId, gw }) => { const data = await getEntryPicks(entryId, gw); return { content: [ { type: "text", text: JSON.stringify(data) } ] }; });

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