getTeamData
Retrieve comprehensive team statistics and information from the Fantasy Premier League API to analyze performance and make data-driven decisions.
Instructions
Fetch all team data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:201-215 (registration)Registration of the MCP tool 'getTeamData' with empty input schema and inline handler function that calls the getTeamData helper and returns the result as JSON text content.server.registerTool("getTeamData", { title: "Get Team Data", description: "Fetch all team data", inputSchema: {} }, async () => { const data = await getTeamData(); return { content: [ { type: "text", text: JSON.stringify(data) } ] }; });
- src/server.ts:205-215 (handler)Inline handler function that executes the tool logic: fetches team data using helper and formats it for MCP response.}, async () => { const data = await getTeamData(); return { content: [ { type: "text", text: JSON.stringify(data) } ] }; });
- src/fpl.ts:104-109 (helper)Helper function that retrieves the bootstrap-static API data and extracts the 'teams' portion.export async function getTeamData(): Promise<Partial<FplApiObject>> { const data = await getBootstrapStatic(); return { teams: data.teams, }; }