cito-mcp 0.3.4 → 0.3.5

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.
Files changed (2) hide show
  1. package/dist/tools/live.js +23 -6
  2. package/package.json +1 -1
@@ -514,12 +514,7 @@ Example: { "game": "lol", "hours": 72, "team": "t1", "limit": 20 }`,
514
514
  noteIgnored('tournamentId', 'tennis fixtures have no tournamentId filter');
515
515
  if (team)
516
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');
517
+ // hours / from / to applied client-side after fetch (below) — not warned as ignored.
523
518
  }
524
519
  const res = await fetchJson(ctx, path, { query });
525
520
  if (!res.ok) {
@@ -600,6 +595,28 @@ Example: { "game": "lol", "hours": 72, "team": "t1", "limit": 20 }`,
600
595
  }
601
596
  }
602
597
  }
598
+ // Tennis: client-side hours / from / to window (fixtures list has no time params)
599
+ if (game === 'tennis' && (args.hours !== undefined || from || to)) {
600
+ const now = Date.now();
601
+ const fromMs = from ? Date.parse(from) : now;
602
+ const toMs = to ? Date.parse(to) : now + hours * 3600_000;
603
+ if (Number.isFinite(fromMs) && Number.isFinite(toMs)) {
604
+ const before = rows.length;
605
+ rows = rows.filter((row) => {
606
+ const r = asRecord(row) ?? {};
607
+ const ts = pickString(r.startTime, r.start_time, r.startsAt);
608
+ if (!ts)
609
+ return true; // keep undated rows rather than drop them
610
+ const t = Date.parse(ts);
611
+ if (!Number.isFinite(t))
612
+ return true;
613
+ return t >= fromMs && t <= toMs;
614
+ });
615
+ if (before > 0 && rows.length === 0) {
616
+ warnings.push(`hours/from/to window matched 0 of ${before} tennis fixtures — widen hours or omit time filters`);
617
+ }
618
+ }
619
+ }
603
620
  // Client-side team filter when API ignored it
604
621
  if (team && (game === 'dota2' || game === 'cs2')) {
605
622
  const t = team.toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cito-mcp",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
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": {