cito-mcp 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -504,20 +504,22 @@ Example: { "game": "lol", "hours": 72, "team": "t1", "limit": 20 }`,
504
504
  noteIgnored('tournamentId', 'pass event slug via event_card instead');
505
505
  }
506
506
  else if (game === 'tennis') {
507
- // Tennis has no upcoming-fixtures endpoint; the archive is results-only.
508
- return errorEnvelope({
509
- code: 'UNSUPPORTED_GAME',
510
- message: 'Tennis has no upcoming-fixtures feed. Live matches: live_matches { game: "tennis" }. Recent results: call_api GET /tennis/matches/recent. Season calendar: call_api GET /tennis/tournaments/calendar?year=YYYY.',
511
- game,
512
- source: 'upcoming_schedule',
513
- requestId,
514
- tookMs: Date.now() - started,
515
- recover: [
516
- 'Use live_matches with game "tennis" for in-progress matches',
517
- 'Use call_api GET /tennis/matches/recent for latest results',
518
- 'Use call_api GET /tennis/tournaments/calendar?year=YYYY for the season schedule',
519
- ],
520
- });
507
+ // Scheduled fixtures for ~3 days out; ids are stable across
508
+ // upcoming -> live -> finished (same s365_{gid} id-space).
509
+ path = '/tennis/matches/upcoming';
510
+ query = { limit: Math.min(500, Math.max(limit, 1)) };
511
+ if (league)
512
+ noteIgnored('league', 'tennis fixtures have no league filter; filter by tournament name client-side');
513
+ if (tournamentId)
514
+ noteIgnored('tournamentId', 'tennis fixtures have no tournamentId filter');
515
+ if (team)
516
+ noteIgnored('team', 'tennis fixtures have no team filter; match player names client-side');
517
+ if (args.hours !== undefined)
518
+ noteIgnored('hours', 'tennis fixtures cover ~3 days; filter by startTime client-side');
519
+ if (from)
520
+ noteIgnored('from', 'tennis fixtures cover ~3 days; filter by startTime client-side');
521
+ if (to)
522
+ noteIgnored('to', 'tennis fixtures cover ~3 days; filter by startTime client-side');
521
523
  }
522
524
  const res = await fetchJson(ctx, path, { query });
523
525
  if (!res.ok) {
@@ -36,8 +36,13 @@ function matchCore(game, matchId, raw) {
36
36
  league: m.league,
37
37
  method: pickString(r.method, r.resultMethod) ?? null,
38
38
  winner: (() => {
39
- // UFC rows carry an explicit winner slug/fighter ref.
40
- const explicit = pickString(r.winnerFighterSlug, r.winnerSlug, r.winner);
39
+ // Never name a winner while play is in progress: the score fallback
40
+ // below reads "who is ahead", which mid-match is a lead, not a result.
41
+ if (m.status === 'live' || m.status === 'upcoming')
42
+ return null;
43
+ // UFC rows carry an explicit winner slug/fighter ref; tennis archive
44
+ // rows nest a winner object.
45
+ const explicit = pickString(r.winnerFighterSlug, r.winnerSlug, r.winner, asRecord(r.winner)?.id);
41
46
  if (explicit)
42
47
  return explicit;
43
48
  if (game === 'ufc')
@@ -85,6 +90,18 @@ function matchCore(game, matchId, raw) {
85
90
  };
86
91
  })(),
87
92
  rawStatus: pickString(r.status, r.state) ?? null,
93
+ // Point-level live state (tennis): current game score like "40-AD", which
94
+ // side is serving, and the set in progress. Absent for other games.
95
+ ...(game === 'tennis' && (r.game_score || r.server)
96
+ ? {
97
+ liveState: {
98
+ gameScore: pickString(r.game_score) ?? null,
99
+ server: typeof r.server === 'number' ? r.server : null,
100
+ currentSet: typeof r.current_set === 'number' ? r.current_set : null,
101
+ tiebreakScore: pickString(r.tiebreak_score) ?? null,
102
+ },
103
+ }
104
+ : {}),
88
105
  };
89
106
  }
90
107
  function primaryPath(game, matchId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cito-mcp",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Standalone MCP server for the Cito esports API — 15 curated outcome tools for agents (live, schedule, profiles, standings, previews, event cards).",
5
5
  "type": "module",
6
6
  "bin": {