propline_get_scores
Retrieve recent and live game scores with status (scheduled, live, final) for a sport. Quickly check if a game is finished and see the final score.
Instructions
Free-tier endpoint. Returns recent and live game scores plus status (scheduled, live, final) for a sport. Useful for: 'is this game over yet, what was the final score'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sport_key | Yes | ||
| days_from | No | How many past days of completed games to include. Defaults to 1. |
Implementation Reference
- src/index.ts:196-218 (registration)Registration of the 'propline_get_scores' tool in the tools array. Defines name, description, input schema (sport_key required, optional days_from), and the inline handler.
{ name: "propline_get_scores", description: "Free-tier endpoint. Returns recent and live game scores plus " + "status (scheduled, live, final) for a sport. Useful for: 'is " + "this game over yet, what was the final score'.", inputSchema: { type: "object", properties: { sport_key: { type: "string" }, days_from: { type: "number", description: "How many past days of completed games to include. Defaults to 1.", }, }, required: ["sport_key"], additionalProperties: false, }, handler: (args) => client().getScores(args.sport_key as string, { daysFrom: args.days_from as number | undefined, }), - src/index.ts:215-218 (handler)The handler function that executes the tool logic. Calls client().getScores() with sport_key and optional daysFrom parameter.
handler: (args) => client().getScores(args.sport_key as string, { daysFrom: args.days_from as number | undefined, }), - src/index.ts:202-213 (schema)Input schema for the tool: requires 'sport_key' (string), optional 'days_from' (number), with additionalProperties disabled.
inputSchema: { type: "object", properties: { sport_key: { type: "string" }, days_from: { type: "number", description: "How many past days of completed games to include. Defaults to 1.", }, }, required: ["sport_key"], additionalProperties: false, - src/client.ts:129-133 (helper)The getScores() helper method on PropLineClient that makes the actual HTTP GET request to /v1/sports/{sportKey}/scores with optional daysFrom query parameter.
getScores(sportKey: string, opts: { daysFrom?: number } = {}): Promise<unknown> { return this.request(`/v1/sports/${sportKey}/scores`, { daysFrom: opts.daysFrom, }); }