getChipData
Fetch chip usage data for Fantasy Premier League teams to track strategic decisions and optimize gameplay.
Instructions
Fetch all chip data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:233-247 (registration)Registration of the MCP tool 'getChipData' with empty input schema, title, description, and an inline handler that calls the underlying getChipData function and returns JSON stringified response.server.registerTool("getChipData", { title: "Get Chip Data", description: "Fetch all chip data", inputSchema: {} }, async () => { const data = await getChipData(); return { content: [ { type: "text", text: JSON.stringify(data) } ] }; });
- src/fpl.ts:118-123 (handler)Core handler logic for fetching chip data from FPL bootstrap-static API and returning the chips array. This is the main implementation delegated by the MCP tool handler.export async function getChipData(): Promise<Partial<FplApiObject>> { const data = await getBootstrapStatic(); return { chips: data.chips, }; }
- src/types.ts:145-151 (schema)TypeScript interface defining the structure of FplApiObject, including the 'chips' field used in getChipData return type.export interface FplApiObject { chips: Partial<Chip>[]; events: Partial<Event>[]; element_types: Partial<ElementType>[]; teams: Partial<Team>[]; elements: Partial<Element>[]; }
- src/types.ts:8-16 (schema)TypeScript interface defining the Chip object structure returned by getChipData.export interface Chip { id: number; name: string; number: number; start_event: number; stop_event: number; chip_type: string; overrides: ChipOverride; }