Get Regions
getRegionsRetrieve the list of available regions for Fantasy Premier League data access and filtering.
Instructions
Fetch FPL region list
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getRegions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:152-166 (registration)Registration of the MCP 'getRegions' tool. Includes schema (empty inputSchema), title, description, and a thin wrapper handler that calls the getRegions helper and formats the response as MCP content.
server.registerTool("getRegions", { title: "Get Regions", description: "Fetch FPL region list", inputSchema: {} }, async () => { const data = await getRegions(); return { content: [ { type: "text", text: JSON.stringify(data) } ] }; }); - src/fpl.ts:80-83 (handler)Core handler function implementing the getRegions tool logic by fetching the regions data from the Fantasy Premier League API and returning the parsed JSON.
export async function getRegions(): Promise<any> { const res = await fetch('https://fantasy.premierleague.com/api/regions/'); return res.json(); }