cito-mcp 0.3.6 → 0.3.8

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.
@@ -634,14 +634,32 @@ Example: { "game": "lol", "hours": 72, "team": "t1", "limit": 20 }`,
634
634
  if (team && (game === 'dota2' || game === 'cs2' || clientTeamFilter)) {
635
635
  beforeTeamFilter = rows.length;
636
636
  const t = team.toLowerCase();
637
- rows = rows.filter((row) => {
637
+ // Exact identity first. A joined-substring match made "t1" hit "T1
638
+ // Esports Academy", so asking for T1 returned the academy's fixtures --
639
+ // a different team, quietly. Substring is still useful for partial names
640
+ // ("vitality"), so it stays as a fallback only when nothing matched
641
+ // exactly.
642
+ const sides = (row) => {
638
643
  const m = normalizeMatch(game, row, 'upcoming');
639
- const hay = [m.team1?.id, m.team1?.slug, m.team1?.name, m.team2?.id, m.team2?.slug, m.team2?.name]
644
+ return [m.team1, m.team2];
645
+ };
646
+ const exact = rows.filter((row) => sides(row).some((s) => [s?.id, s?.slug].filter(Boolean).some((v) => String(v).toLowerCase() === t)));
647
+ if (exact.length > 0) {
648
+ rows = exact;
649
+ }
650
+ else if (t.length <= 4) {
651
+ // A short term is an identifier, not a search phrase, so it is exact or
652
+ // nothing. T1 had no fixture in the window and the substring fallback
653
+ // answered with "T1 Esports Academy" (slugs t1a and t1-challengers) --
654
+ // a different team, presented as if it were the one asked for. An empty
655
+ // list is the correct answer here.
656
+ rows = [];
657
+ }
658
+ else {
659
+ rows = rows.filter((row) => sides(row).some((s) => [s?.id, s?.slug, s?.name]
640
660
  .filter(Boolean)
641
- .join(' ')
642
- .toLowerCase();
643
- return hay.includes(t);
644
- });
661
+ .some((v) => String(v).toLowerCase().includes(t))));
662
+ }
645
663
  }
646
664
  if (team && beforeTeamFilter > 0 && rows.length === 0) {
647
665
  warnings.push(`team "${team}" matched 0 of ${beforeTeamFilter} upcoming fixtures in this window — widen hours or check the slug`);
@@ -280,7 +280,7 @@ export function normalizeMatch(game, row, forcedStatus) {
280
280
  else if (/complete|finished|ended|final|closed|done|official|result/.test(statusRaw) || hasResult) {
281
281
  status = 'completed';
282
282
  }
283
- else if (/upcoming|scheduled|not_started|pending|soon|booked|confirmed|announced/.test(statusRaw) ||
283
+ else if (/upcoming|scheduled|not_?started|unstarted|pending|soon|booked|confirmed|announced|tbd/.test(statusRaw) ||
284
284
  (game === 'ufc' && !hasResult && (startTime || statusRaw === '' || statusRaw === 'unknown'))) {
285
285
  // UFC bouts often omit status or use sparse values; default upcoming when no result yet.
286
286
  if (hasResult)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cito-mcp",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
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": {