getEntryTransfers
Retrieve all player transfers for a specific Fantasy Premier League team using its entry ID. This tool helps FPL managers track their team's transfer history and analyze squad changes.
Instructions
Fetch all transfers of a team
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entryId | Yes |
Implementation Reference
- src/fpl.ts:60-63 (handler)Core handler function that performs the HTTP fetch to retrieve transfers data for the specified entry ID from the FPL API.export async function getEntryTransfers(entryId: number): Promise<any> { const res = await fetch(`https://fantasy.premierleague.com/api/entry/${entryId}/transfers/`); return res.json(); }
- src/server.ts:84-98 (registration)MCP tool registration for 'getEntryTransfers', defining title, description, input schema requiring entryId (number), and thin async handler that invokes the core getEntryTransfers function and returns JSON stringified response in MCP content format.server.registerTool("getEntryTransfers", { title: "Get Entry Transfers", description: "Fetch all transfers of a team", inputSchema: { entryId: z.number() } }, async ({ entryId }) => { const data = await getEntryTransfers(entryId); return { content: [ { type: "text", text: JSON.stringify(data) } ] }; });
- src/server.ts:87-87 (schema)Zod-based input schema validation for the tool, requiring a single 'entryId' parameter of type number.inputSchema: { entryId: z.number() }