@withinfocus/tba-mcp-server 0.2.3 → 0.2.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.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1943 -1876
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -420,2022 +420,2089 @@ function getApiKey() {
|
|
|
420
420
|
if (!API_KEY) {
|
|
421
421
|
API_KEY = process.env['TBA_API_KEY'];
|
|
422
422
|
if (!API_KEY) {
|
|
423
|
-
|
|
423
|
+
const errorMessage = 'TBA_API_KEY environment variable is required but not set. Please set the TBA_API_KEY environment variable with your The Blue Alliance API key.';
|
|
424
|
+
console.error(errorMessage);
|
|
425
|
+
throw new Error(errorMessage);
|
|
426
|
+
}
|
|
427
|
+
if (API_KEY.trim() === '') {
|
|
428
|
+
const errorMessage = 'TBA_API_KEY environment variable is set but empty. Please provide a valid The Blue Alliance API key.';
|
|
429
|
+
console.error(errorMessage);
|
|
430
|
+
throw new Error(errorMessage);
|
|
424
431
|
}
|
|
425
432
|
}
|
|
426
433
|
return API_KEY;
|
|
427
434
|
}
|
|
428
435
|
export async function makeApiRequest(endpoint) {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
436
|
+
try {
|
|
437
|
+
const apiKey = getApiKey();
|
|
438
|
+
const url = `https://www.thebluealliance.com/api/v3${endpoint}`;
|
|
439
|
+
const response = await fetch(url, {
|
|
440
|
+
headers: {
|
|
441
|
+
'X-TBA-Auth-Key': apiKey,
|
|
442
|
+
Accept: 'application/json',
|
|
443
|
+
},
|
|
444
|
+
});
|
|
445
|
+
if (!response.ok) {
|
|
446
|
+
const errorMessage = `TBA API request failed: ${response.status} ${response.statusText} for endpoint ${endpoint}`;
|
|
447
|
+
console.error(errorMessage);
|
|
448
|
+
throw new Error(errorMessage);
|
|
449
|
+
}
|
|
450
|
+
return response.json();
|
|
451
|
+
}
|
|
452
|
+
catch (error) {
|
|
453
|
+
if (error instanceof Error) {
|
|
454
|
+
console.error(`API request error for endpoint ${endpoint}:`, error.message);
|
|
455
|
+
throw error;
|
|
456
|
+
}
|
|
457
|
+
const errorMessage = `Unknown error during API request for endpoint ${endpoint}`;
|
|
458
|
+
console.error(errorMessage, error);
|
|
459
|
+
throw new Error(errorMessage);
|
|
439
460
|
}
|
|
440
|
-
return response.json();
|
|
441
461
|
}
|
|
442
462
|
async function runServer() {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
try {
|
|
464
|
+
console.error('The Blue Alliance MCP Server starting ...');
|
|
465
|
+
// Validate API key availability early
|
|
466
|
+
try {
|
|
467
|
+
getApiKey();
|
|
468
|
+
console.error('TBA API key validated successfully');
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
const errorMessage = 'Failed to get TBA API key';
|
|
472
|
+
console.error(errorMessage, error instanceof Error ? error.message : error);
|
|
473
|
+
throw new Error(errorMessage);
|
|
474
|
+
}
|
|
475
|
+
console.error('Initializing MCP server ...');
|
|
476
|
+
const server = new Server({
|
|
477
|
+
name: 'The Blue Alliance MCP Server',
|
|
478
|
+
version: '0.2.4',
|
|
479
|
+
}, {
|
|
480
|
+
capabilities: {
|
|
481
|
+
tools: {},
|
|
482
|
+
},
|
|
483
|
+
});
|
|
484
|
+
console.error('Setting up request handlers ...');
|
|
485
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
486
|
+
return {
|
|
487
|
+
tools: [
|
|
488
|
+
{
|
|
489
|
+
name: 'get_team',
|
|
490
|
+
description: 'Get detailed information about a specific FRC team',
|
|
491
|
+
inputSchema: {
|
|
492
|
+
type: 'object',
|
|
493
|
+
properties: {
|
|
494
|
+
team_key: {
|
|
495
|
+
type: 'string',
|
|
496
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
497
|
+
pattern: '^frc\\d+$',
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
required: ['team_key'],
|
|
466
501
|
},
|
|
467
|
-
required: ['team_key'],
|
|
468
502
|
},
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
},
|
|
503
|
+
{
|
|
504
|
+
name: 'get_team_events',
|
|
505
|
+
description: 'Get events that a team has participated in for a given year',
|
|
506
|
+
inputSchema: {
|
|
507
|
+
type: 'object',
|
|
508
|
+
properties: {
|
|
509
|
+
team_key: {
|
|
510
|
+
type: 'string',
|
|
511
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
512
|
+
pattern: '^frc\\d+$',
|
|
513
|
+
},
|
|
514
|
+
year: {
|
|
515
|
+
type: 'number',
|
|
516
|
+
description: 'Competition year',
|
|
517
|
+
minimum: 1992,
|
|
518
|
+
maximum: new Date().getFullYear() + 1,
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
required: ['team_key', 'year'],
|
|
487
522
|
},
|
|
488
|
-
required: ['team_key', 'year'],
|
|
489
523
|
},
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
},
|
|
524
|
+
{
|
|
525
|
+
name: 'get_team_awards',
|
|
526
|
+
description: 'Get awards won by a team in a specific year',
|
|
527
|
+
inputSchema: {
|
|
528
|
+
type: 'object',
|
|
529
|
+
properties: {
|
|
530
|
+
team_key: {
|
|
531
|
+
type: 'string',
|
|
532
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
533
|
+
pattern: '^frc\\d+$',
|
|
534
|
+
},
|
|
535
|
+
year: {
|
|
536
|
+
type: 'number',
|
|
537
|
+
description: 'Competition year',
|
|
538
|
+
minimum: 1992,
|
|
539
|
+
maximum: new Date().getFullYear() + 1,
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
required: ['team_key', 'year'],
|
|
508
543
|
},
|
|
509
|
-
required: ['team_key', 'year'],
|
|
510
544
|
},
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
},
|
|
545
|
+
{
|
|
546
|
+
name: 'get_team_matches',
|
|
547
|
+
description: 'Get matches played by a team in a specific year',
|
|
548
|
+
inputSchema: {
|
|
549
|
+
type: 'object',
|
|
550
|
+
properties: {
|
|
551
|
+
team_key: {
|
|
552
|
+
type: 'string',
|
|
553
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
554
|
+
pattern: '^frc\\d+$',
|
|
555
|
+
},
|
|
556
|
+
year: {
|
|
557
|
+
type: 'number',
|
|
558
|
+
description: 'Competition year',
|
|
559
|
+
minimum: 1992,
|
|
560
|
+
maximum: new Date().getFullYear() + 1,
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
required: ['team_key', 'year'],
|
|
529
564
|
},
|
|
530
|
-
required: ['team_key', 'year'],
|
|
531
565
|
},
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
},
|
|
566
|
+
{
|
|
567
|
+
name: 'get_events',
|
|
568
|
+
description: 'Get all FRC events for a specific year',
|
|
569
|
+
inputSchema: {
|
|
570
|
+
type: 'object',
|
|
571
|
+
properties: {
|
|
572
|
+
year: {
|
|
573
|
+
type: 'number',
|
|
574
|
+
description: 'Competition year',
|
|
575
|
+
minimum: 1992,
|
|
576
|
+
maximum: new Date().getFullYear() + 1,
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
required: ['year'],
|
|
545
580
|
},
|
|
546
|
-
required: ['year'],
|
|
547
581
|
},
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
},
|
|
582
|
+
{
|
|
583
|
+
name: 'get_event',
|
|
584
|
+
description: 'Get detailed information about a specific event',
|
|
585
|
+
inputSchema: {
|
|
586
|
+
type: 'object',
|
|
587
|
+
properties: {
|
|
588
|
+
event_key: {
|
|
589
|
+
type: 'string',
|
|
590
|
+
description: 'Event key (e.g., 2023casj)',
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
required: ['event_key'],
|
|
559
594
|
},
|
|
560
|
-
required: ['event_key'],
|
|
561
595
|
},
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
},
|
|
596
|
+
{
|
|
597
|
+
name: 'get_event_teams',
|
|
598
|
+
description: 'Get teams participating in a specific event',
|
|
599
|
+
inputSchema: {
|
|
600
|
+
type: 'object',
|
|
601
|
+
properties: {
|
|
602
|
+
event_key: {
|
|
603
|
+
type: 'string',
|
|
604
|
+
description: 'Event key (e.g., 2023casj)',
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
required: ['event_key'],
|
|
573
608
|
},
|
|
574
|
-
required: ['event_key'],
|
|
575
609
|
},
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
},
|
|
610
|
+
{
|
|
611
|
+
name: 'get_event_rankings',
|
|
612
|
+
description: 'Get team rankings for a specific event',
|
|
613
|
+
inputSchema: {
|
|
614
|
+
type: 'object',
|
|
615
|
+
properties: {
|
|
616
|
+
event_key: {
|
|
617
|
+
type: 'string',
|
|
618
|
+
description: 'Event key (e.g., 2023casj)',
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
required: ['event_key'],
|
|
587
622
|
},
|
|
588
|
-
required: ['event_key'],
|
|
589
623
|
},
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
},
|
|
624
|
+
{
|
|
625
|
+
name: 'get_event_matches',
|
|
626
|
+
description: 'Get matches for a specific event',
|
|
627
|
+
inputSchema: {
|
|
628
|
+
type: 'object',
|
|
629
|
+
properties: {
|
|
630
|
+
event_key: {
|
|
631
|
+
type: 'string',
|
|
632
|
+
description: 'Event key (e.g., 2023casj)',
|
|
633
|
+
},
|
|
634
|
+
},
|
|
635
|
+
required: ['event_key'],
|
|
601
636
|
},
|
|
602
|
-
required: ['event_key'],
|
|
603
637
|
},
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
},
|
|
638
|
+
{
|
|
639
|
+
name: 'get_event_alliances',
|
|
640
|
+
description: 'Get elimination alliances for a specific event',
|
|
641
|
+
inputSchema: {
|
|
642
|
+
type: 'object',
|
|
643
|
+
properties: {
|
|
644
|
+
event_key: {
|
|
645
|
+
type: 'string',
|
|
646
|
+
description: 'Event key (e.g., 2023casj)',
|
|
647
|
+
},
|
|
648
|
+
},
|
|
649
|
+
required: ['event_key'],
|
|
615
650
|
},
|
|
616
|
-
required: ['event_key'],
|
|
617
651
|
},
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
},
|
|
652
|
+
{
|
|
653
|
+
name: 'get_event_insights',
|
|
654
|
+
description: 'Get event-specific insights and statistics',
|
|
655
|
+
inputSchema: {
|
|
656
|
+
type: 'object',
|
|
657
|
+
properties: {
|
|
658
|
+
event_key: {
|
|
659
|
+
type: 'string',
|
|
660
|
+
description: 'Event key (e.g., 2023casj)',
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
required: ['event_key'],
|
|
629
664
|
},
|
|
630
|
-
required: ['event_key'],
|
|
631
665
|
},
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
},
|
|
666
|
+
{
|
|
667
|
+
name: 'get_event_district_points',
|
|
668
|
+
description: 'Get district points for teams at an event',
|
|
669
|
+
inputSchema: {
|
|
670
|
+
type: 'object',
|
|
671
|
+
properties: {
|
|
672
|
+
event_key: {
|
|
673
|
+
type: 'string',
|
|
674
|
+
description: 'Event key (e.g., 2023casj)',
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
required: ['event_key'],
|
|
643
678
|
},
|
|
644
|
-
required: ['event_key'],
|
|
645
679
|
},
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
},
|
|
680
|
+
{
|
|
681
|
+
name: 'get_team_years_participated',
|
|
682
|
+
description: 'Get years that a team has participated in competition',
|
|
683
|
+
inputSchema: {
|
|
684
|
+
type: 'object',
|
|
685
|
+
properties: {
|
|
686
|
+
team_key: {
|
|
687
|
+
type: 'string',
|
|
688
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
689
|
+
pattern: '^frc\\d+$',
|
|
690
|
+
},
|
|
691
|
+
},
|
|
692
|
+
required: ['team_key'],
|
|
658
693
|
},
|
|
659
|
-
required: ['team_key'],
|
|
660
694
|
},
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
},
|
|
695
|
+
{
|
|
696
|
+
name: 'get_team_districts',
|
|
697
|
+
description: 'Get district history for a team',
|
|
698
|
+
inputSchema: {
|
|
699
|
+
type: 'object',
|
|
700
|
+
properties: {
|
|
701
|
+
team_key: {
|
|
702
|
+
type: 'string',
|
|
703
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
704
|
+
pattern: '^frc\\d+$',
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
required: ['team_key'],
|
|
673
708
|
},
|
|
674
|
-
required: ['team_key'],
|
|
675
709
|
},
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
},
|
|
710
|
+
{
|
|
711
|
+
name: 'get_team_robots',
|
|
712
|
+
description: 'Get robot names for a team by year',
|
|
713
|
+
inputSchema: {
|
|
714
|
+
type: 'object',
|
|
715
|
+
properties: {
|
|
716
|
+
team_key: {
|
|
717
|
+
type: 'string',
|
|
718
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
719
|
+
pattern: '^frc\\d+$',
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
required: ['team_key'],
|
|
688
723
|
},
|
|
689
|
-
required: ['team_key'],
|
|
690
724
|
},
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
},
|
|
725
|
+
{
|
|
726
|
+
name: 'get_team_media',
|
|
727
|
+
description: 'Get media for a team in a specific year',
|
|
728
|
+
inputSchema: {
|
|
729
|
+
type: 'object',
|
|
730
|
+
properties: {
|
|
731
|
+
team_key: {
|
|
732
|
+
type: 'string',
|
|
733
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
734
|
+
pattern: '^frc\\d+$',
|
|
735
|
+
},
|
|
736
|
+
year: {
|
|
737
|
+
type: 'number',
|
|
738
|
+
description: 'Competition year',
|
|
739
|
+
minimum: 1992,
|
|
740
|
+
maximum: new Date().getFullYear() + 1,
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
required: ['team_key', 'year'],
|
|
709
744
|
},
|
|
710
|
-
required: ['team_key', 'year'],
|
|
711
745
|
},
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
},
|
|
746
|
+
{
|
|
747
|
+
name: 'get_team_event_matches',
|
|
748
|
+
description: 'Get matches for a team at a specific event',
|
|
749
|
+
inputSchema: {
|
|
750
|
+
type: 'object',
|
|
751
|
+
properties: {
|
|
752
|
+
team_key: {
|
|
753
|
+
type: 'string',
|
|
754
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
755
|
+
pattern: '^frc\\d+$',
|
|
756
|
+
},
|
|
757
|
+
event_key: {
|
|
758
|
+
type: 'string',
|
|
759
|
+
description: 'Event key (e.g., 2023casj)',
|
|
760
|
+
},
|
|
761
|
+
},
|
|
762
|
+
required: ['team_key', 'event_key'],
|
|
728
763
|
},
|
|
729
|
-
required: ['team_key', 'event_key'],
|
|
730
764
|
},
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
},
|
|
765
|
+
{
|
|
766
|
+
name: 'get_teams',
|
|
767
|
+
description: 'Get list of teams with pagination',
|
|
768
|
+
inputSchema: {
|
|
769
|
+
type: 'object',
|
|
770
|
+
properties: {
|
|
771
|
+
page_num: {
|
|
772
|
+
type: 'number',
|
|
773
|
+
description: 'Page number (0-indexed)',
|
|
774
|
+
minimum: 0,
|
|
775
|
+
},
|
|
776
|
+
},
|
|
777
|
+
required: ['page_num'],
|
|
743
778
|
},
|
|
744
|
-
required: ['page_num'],
|
|
745
779
|
},
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
780
|
+
{
|
|
781
|
+
name: 'get_status',
|
|
782
|
+
description: 'Get TBA API status information',
|
|
783
|
+
inputSchema: {
|
|
784
|
+
type: 'object',
|
|
785
|
+
properties: {},
|
|
786
|
+
},
|
|
753
787
|
},
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
},
|
|
788
|
+
{
|
|
789
|
+
name: 'get_match',
|
|
790
|
+
description: 'Get detailed information about a specific match',
|
|
791
|
+
inputSchema: {
|
|
792
|
+
type: 'object',
|
|
793
|
+
properties: {
|
|
794
|
+
match_key: {
|
|
795
|
+
type: 'string',
|
|
796
|
+
description: 'Match key (e.g., 2023casj_qm1)',
|
|
797
|
+
},
|
|
798
|
+
},
|
|
799
|
+
required: ['match_key'],
|
|
765
800
|
},
|
|
766
|
-
required: ['match_key'],
|
|
767
801
|
},
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
},
|
|
802
|
+
{
|
|
803
|
+
name: 'get_event_oprs',
|
|
804
|
+
description: 'Get OPR, DPR, and CCWM ratings for teams at an event',
|
|
805
|
+
inputSchema: {
|
|
806
|
+
type: 'object',
|
|
807
|
+
properties: {
|
|
808
|
+
event_key: {
|
|
809
|
+
type: 'string',
|
|
810
|
+
description: 'Event key (e.g., 2023casj)',
|
|
811
|
+
},
|
|
812
|
+
},
|
|
813
|
+
required: ['event_key'],
|
|
779
814
|
},
|
|
780
|
-
required: ['event_key'],
|
|
781
815
|
},
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
},
|
|
816
|
+
{
|
|
817
|
+
name: 'get_event_awards',
|
|
818
|
+
description: 'Get awards from a specific event',
|
|
819
|
+
inputSchema: {
|
|
820
|
+
type: 'object',
|
|
821
|
+
properties: {
|
|
822
|
+
event_key: {
|
|
823
|
+
type: 'string',
|
|
824
|
+
description: 'Event key (e.g., 2023casj)',
|
|
825
|
+
},
|
|
826
|
+
},
|
|
827
|
+
required: ['event_key'],
|
|
793
828
|
},
|
|
794
|
-
required: ['event_key'],
|
|
795
829
|
},
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
},
|
|
830
|
+
{
|
|
831
|
+
name: 'get_team_awards_all',
|
|
832
|
+
description: 'Get all awards won by a team across all years',
|
|
833
|
+
inputSchema: {
|
|
834
|
+
type: 'object',
|
|
835
|
+
properties: {
|
|
836
|
+
team_key: {
|
|
837
|
+
type: 'string',
|
|
838
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
839
|
+
pattern: '^frc\\d+$',
|
|
840
|
+
},
|
|
841
|
+
},
|
|
842
|
+
required: ['team_key'],
|
|
808
843
|
},
|
|
809
|
-
required: ['team_key'],
|
|
810
844
|
},
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
},
|
|
845
|
+
{
|
|
846
|
+
name: 'get_team_events_all',
|
|
847
|
+
description: 'Get all events a team has participated in across all years',
|
|
848
|
+
inputSchema: {
|
|
849
|
+
type: 'object',
|
|
850
|
+
properties: {
|
|
851
|
+
team_key: {
|
|
852
|
+
type: 'string',
|
|
853
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
854
|
+
pattern: '^frc\\d+$',
|
|
855
|
+
},
|
|
856
|
+
},
|
|
857
|
+
required: ['team_key'],
|
|
823
858
|
},
|
|
824
|
-
required: ['team_key'],
|
|
825
859
|
},
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
},
|
|
860
|
+
{
|
|
861
|
+
name: 'get_team_event_status',
|
|
862
|
+
description: 'Get team competition rank and status at a specific event',
|
|
863
|
+
inputSchema: {
|
|
864
|
+
type: 'object',
|
|
865
|
+
properties: {
|
|
866
|
+
team_key: {
|
|
867
|
+
type: 'string',
|
|
868
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
869
|
+
pattern: '^frc\\d+$',
|
|
870
|
+
},
|
|
871
|
+
event_key: {
|
|
872
|
+
type: 'string',
|
|
873
|
+
description: 'Event key (e.g., 2023casj)',
|
|
874
|
+
},
|
|
875
|
+
},
|
|
876
|
+
required: ['team_key', 'event_key'],
|
|
842
877
|
},
|
|
843
|
-
required: ['team_key', 'event_key'],
|
|
844
878
|
},
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
},
|
|
879
|
+
{
|
|
880
|
+
name: 'get_districts',
|
|
881
|
+
description: 'Get all districts for a specific year',
|
|
882
|
+
inputSchema: {
|
|
883
|
+
type: 'object',
|
|
884
|
+
properties: {
|
|
885
|
+
year: {
|
|
886
|
+
type: 'number',
|
|
887
|
+
description: 'Competition year',
|
|
888
|
+
minimum: 1992,
|
|
889
|
+
maximum: new Date().getFullYear() + 1,
|
|
890
|
+
},
|
|
891
|
+
},
|
|
892
|
+
required: ['year'],
|
|
858
893
|
},
|
|
859
|
-
required: ['year'],
|
|
860
894
|
},
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
},
|
|
895
|
+
{
|
|
896
|
+
name: 'get_district_rankings',
|
|
897
|
+
description: 'Get team rankings within a district',
|
|
898
|
+
inputSchema: {
|
|
899
|
+
type: 'object',
|
|
900
|
+
properties: {
|
|
901
|
+
district_key: {
|
|
902
|
+
type: 'string',
|
|
903
|
+
description: 'District key (e.g., 2023fim)',
|
|
904
|
+
},
|
|
905
|
+
},
|
|
906
|
+
required: ['district_key'],
|
|
872
907
|
},
|
|
873
|
-
required: ['district_key'],
|
|
874
908
|
},
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
},
|
|
909
|
+
{
|
|
910
|
+
name: 'get_teams_simple',
|
|
911
|
+
description: 'Get simplified list of teams with pagination',
|
|
912
|
+
inputSchema: {
|
|
913
|
+
type: 'object',
|
|
914
|
+
properties: {
|
|
915
|
+
page_num: {
|
|
916
|
+
type: 'number',
|
|
917
|
+
description: 'Page number (0-indexed)',
|
|
918
|
+
minimum: 0,
|
|
919
|
+
},
|
|
920
|
+
},
|
|
921
|
+
required: ['page_num'],
|
|
887
922
|
},
|
|
888
|
-
required: ['page_num'],
|
|
889
923
|
},
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
},
|
|
924
|
+
{
|
|
925
|
+
name: 'get_teams_keys',
|
|
926
|
+
description: 'Get list of team keys with pagination',
|
|
927
|
+
inputSchema: {
|
|
928
|
+
type: 'object',
|
|
929
|
+
properties: {
|
|
930
|
+
page_num: {
|
|
931
|
+
type: 'number',
|
|
932
|
+
description: 'Page number (0-indexed)',
|
|
933
|
+
minimum: 0,
|
|
934
|
+
},
|
|
935
|
+
},
|
|
936
|
+
required: ['page_num'],
|
|
902
937
|
},
|
|
903
|
-
required: ['page_num'],
|
|
904
938
|
},
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
},
|
|
939
|
+
{
|
|
940
|
+
name: 'get_teams_by_year',
|
|
941
|
+
description: 'Get teams that competed in a specific year',
|
|
942
|
+
inputSchema: {
|
|
943
|
+
type: 'object',
|
|
944
|
+
properties: {
|
|
945
|
+
year: {
|
|
946
|
+
type: 'number',
|
|
947
|
+
description: 'Competition year',
|
|
948
|
+
minimum: 1992,
|
|
949
|
+
maximum: new Date().getFullYear() + 1,
|
|
950
|
+
},
|
|
951
|
+
page_num: {
|
|
952
|
+
type: 'number',
|
|
953
|
+
description: 'Page number (0-indexed)',
|
|
954
|
+
minimum: 0,
|
|
955
|
+
},
|
|
956
|
+
},
|
|
957
|
+
required: ['year', 'page_num'],
|
|
923
958
|
},
|
|
924
|
-
required: ['year', 'page_num'],
|
|
925
959
|
},
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
},
|
|
960
|
+
{
|
|
961
|
+
name: 'get_teams_by_year_simple',
|
|
962
|
+
description: 'Get simplified teams that competed in a specific year',
|
|
963
|
+
inputSchema: {
|
|
964
|
+
type: 'object',
|
|
965
|
+
properties: {
|
|
966
|
+
year: {
|
|
967
|
+
type: 'number',
|
|
968
|
+
description: 'Competition year',
|
|
969
|
+
minimum: 1992,
|
|
970
|
+
maximum: new Date().getFullYear() + 1,
|
|
971
|
+
},
|
|
972
|
+
page_num: {
|
|
973
|
+
type: 'number',
|
|
974
|
+
description: 'Page number (0-indexed)',
|
|
975
|
+
minimum: 0,
|
|
976
|
+
},
|
|
977
|
+
},
|
|
978
|
+
required: ['year', 'page_num'],
|
|
944
979
|
},
|
|
945
|
-
required: ['year', 'page_num'],
|
|
946
980
|
},
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
},
|
|
981
|
+
{
|
|
982
|
+
name: 'get_teams_by_year_keys',
|
|
983
|
+
description: 'Get team keys that competed in a specific year',
|
|
984
|
+
inputSchema: {
|
|
985
|
+
type: 'object',
|
|
986
|
+
properties: {
|
|
987
|
+
year: {
|
|
988
|
+
type: 'number',
|
|
989
|
+
description: 'Competition year',
|
|
990
|
+
minimum: 1992,
|
|
991
|
+
maximum: new Date().getFullYear() + 1,
|
|
992
|
+
},
|
|
993
|
+
page_num: {
|
|
994
|
+
type: 'number',
|
|
995
|
+
description: 'Page number (0-indexed)',
|
|
996
|
+
minimum: 0,
|
|
997
|
+
},
|
|
998
|
+
},
|
|
999
|
+
required: ['year', 'page_num'],
|
|
965
1000
|
},
|
|
966
|
-
required: ['year', 'page_num'],
|
|
967
1001
|
},
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
},
|
|
1002
|
+
{
|
|
1003
|
+
name: 'get_team_simple',
|
|
1004
|
+
description: 'Get simplified information about a specific team',
|
|
1005
|
+
inputSchema: {
|
|
1006
|
+
type: 'object',
|
|
1007
|
+
properties: {
|
|
1008
|
+
team_key: {
|
|
1009
|
+
type: 'string',
|
|
1010
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1011
|
+
pattern: '^frc\\d+$',
|
|
1012
|
+
},
|
|
1013
|
+
},
|
|
1014
|
+
required: ['team_key'],
|
|
980
1015
|
},
|
|
981
|
-
required: ['team_key'],
|
|
982
1016
|
},
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
},
|
|
1017
|
+
{
|
|
1018
|
+
name: 'get_event_simple',
|
|
1019
|
+
description: 'Get simplified information about a specific event',
|
|
1020
|
+
inputSchema: {
|
|
1021
|
+
type: 'object',
|
|
1022
|
+
properties: {
|
|
1023
|
+
event_key: {
|
|
1024
|
+
type: 'string',
|
|
1025
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1026
|
+
},
|
|
1027
|
+
},
|
|
1028
|
+
required: ['event_key'],
|
|
994
1029
|
},
|
|
995
|
-
required: ['event_key'],
|
|
996
1030
|
},
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
},
|
|
1031
|
+
{
|
|
1032
|
+
name: 'get_events_simple',
|
|
1033
|
+
description: 'Get simplified list of events for a year',
|
|
1034
|
+
inputSchema: {
|
|
1035
|
+
type: 'object',
|
|
1036
|
+
properties: {
|
|
1037
|
+
year: {
|
|
1038
|
+
type: 'number',
|
|
1039
|
+
description: 'Competition year',
|
|
1040
|
+
minimum: 1992,
|
|
1041
|
+
maximum: new Date().getFullYear() + 1,
|
|
1042
|
+
},
|
|
1043
|
+
},
|
|
1044
|
+
required: ['year'],
|
|
1010
1045
|
},
|
|
1011
|
-
required: ['year'],
|
|
1012
1046
|
},
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1047
|
+
{
|
|
1048
|
+
name: 'get_events_keys',
|
|
1049
|
+
description: 'Get list of event keys for a year',
|
|
1050
|
+
inputSchema: {
|
|
1051
|
+
type: 'object',
|
|
1052
|
+
properties: {
|
|
1053
|
+
year: {
|
|
1054
|
+
type: 'number',
|
|
1055
|
+
description: 'Competition year',
|
|
1056
|
+
minimum: 1992,
|
|
1057
|
+
maximum: new Date().getFullYear() + 1,
|
|
1058
|
+
},
|
|
1059
|
+
},
|
|
1060
|
+
required: ['year'],
|
|
1026
1061
|
},
|
|
1027
|
-
required: ['year'],
|
|
1028
1062
|
},
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
},
|
|
1063
|
+
{
|
|
1064
|
+
name: 'get_match_simple',
|
|
1065
|
+
description: 'Get simplified information about a specific match',
|
|
1066
|
+
inputSchema: {
|
|
1067
|
+
type: 'object',
|
|
1068
|
+
properties: {
|
|
1069
|
+
match_key: {
|
|
1070
|
+
type: 'string',
|
|
1071
|
+
description: 'Match key (e.g., 2023casj_qm1)',
|
|
1072
|
+
},
|
|
1073
|
+
},
|
|
1074
|
+
required: ['match_key'],
|
|
1040
1075
|
},
|
|
1041
|
-
required: ['match_key'],
|
|
1042
1076
|
},
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
},
|
|
1077
|
+
{
|
|
1078
|
+
name: 'get_team_events_simple',
|
|
1079
|
+
description: 'Get simplified events for a team in a specific year',
|
|
1080
|
+
inputSchema: {
|
|
1081
|
+
type: 'object',
|
|
1082
|
+
properties: {
|
|
1083
|
+
team_key: {
|
|
1084
|
+
type: 'string',
|
|
1085
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1086
|
+
pattern: '^frc\\d+$',
|
|
1087
|
+
},
|
|
1088
|
+
year: {
|
|
1089
|
+
type: 'number',
|
|
1090
|
+
description: 'Competition year',
|
|
1091
|
+
minimum: 1992,
|
|
1092
|
+
maximum: new Date().getFullYear() + 1,
|
|
1093
|
+
},
|
|
1094
|
+
},
|
|
1095
|
+
required: ['team_key', 'year'],
|
|
1061
1096
|
},
|
|
1062
|
-
required: ['team_key', 'year'],
|
|
1063
1097
|
},
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
},
|
|
1098
|
+
{
|
|
1099
|
+
name: 'get_team_events_keys',
|
|
1100
|
+
description: 'Get event keys for a team in a specific year',
|
|
1101
|
+
inputSchema: {
|
|
1102
|
+
type: 'object',
|
|
1103
|
+
properties: {
|
|
1104
|
+
team_key: {
|
|
1105
|
+
type: 'string',
|
|
1106
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1107
|
+
pattern: '^frc\\d+$',
|
|
1108
|
+
},
|
|
1109
|
+
year: {
|
|
1110
|
+
type: 'number',
|
|
1111
|
+
description: 'Competition year',
|
|
1112
|
+
minimum: 1992,
|
|
1113
|
+
maximum: new Date().getFullYear() + 1,
|
|
1114
|
+
},
|
|
1115
|
+
},
|
|
1116
|
+
required: ['team_key', 'year'],
|
|
1082
1117
|
},
|
|
1083
|
-
required: ['team_key', 'year'],
|
|
1084
1118
|
},
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
},
|
|
1119
|
+
{
|
|
1120
|
+
name: 'get_team_event_awards',
|
|
1121
|
+
description: 'Get awards won by a team at a specific event',
|
|
1122
|
+
inputSchema: {
|
|
1123
|
+
type: 'object',
|
|
1124
|
+
properties: {
|
|
1125
|
+
team_key: {
|
|
1126
|
+
type: 'string',
|
|
1127
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1128
|
+
pattern: '^frc\\d+$',
|
|
1129
|
+
},
|
|
1130
|
+
event_key: {
|
|
1131
|
+
type: 'string',
|
|
1132
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1133
|
+
},
|
|
1134
|
+
},
|
|
1135
|
+
required: ['team_key', 'event_key'],
|
|
1101
1136
|
},
|
|
1102
|
-
required: ['team_key', 'event_key'],
|
|
1103
1137
|
},
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
},
|
|
1138
|
+
{
|
|
1139
|
+
name: 'get_team_matches_simple',
|
|
1140
|
+
description: 'Get simplified matches for a team in a specific year',
|
|
1141
|
+
inputSchema: {
|
|
1142
|
+
type: 'object',
|
|
1143
|
+
properties: {
|
|
1144
|
+
team_key: {
|
|
1145
|
+
type: 'string',
|
|
1146
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1147
|
+
pattern: '^frc\\d+$',
|
|
1148
|
+
},
|
|
1149
|
+
year: {
|
|
1150
|
+
type: 'number',
|
|
1151
|
+
description: 'Competition year',
|
|
1152
|
+
minimum: 1992,
|
|
1153
|
+
maximum: new Date().getFullYear() + 1,
|
|
1154
|
+
},
|
|
1155
|
+
},
|
|
1156
|
+
required: ['team_key', 'year'],
|
|
1122
1157
|
},
|
|
1123
|
-
required: ['team_key', 'year'],
|
|
1124
1158
|
},
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
},
|
|
1159
|
+
{
|
|
1160
|
+
name: 'get_team_matches_keys',
|
|
1161
|
+
description: 'Get match keys for a team in a specific year',
|
|
1162
|
+
inputSchema: {
|
|
1163
|
+
type: 'object',
|
|
1164
|
+
properties: {
|
|
1165
|
+
team_key: {
|
|
1166
|
+
type: 'string',
|
|
1167
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1168
|
+
pattern: '^frc\\d+$',
|
|
1169
|
+
},
|
|
1170
|
+
year: {
|
|
1171
|
+
type: 'number',
|
|
1172
|
+
description: 'Competition year',
|
|
1173
|
+
minimum: 1992,
|
|
1174
|
+
maximum: new Date().getFullYear() + 1,
|
|
1175
|
+
},
|
|
1176
|
+
},
|
|
1177
|
+
required: ['team_key', 'year'],
|
|
1143
1178
|
},
|
|
1144
|
-
required: ['team_key', 'year'],
|
|
1145
1179
|
},
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
},
|
|
1180
|
+
{
|
|
1181
|
+
name: 'get_team_social_media',
|
|
1182
|
+
description: 'Get social media information for a team',
|
|
1183
|
+
inputSchema: {
|
|
1184
|
+
type: 'object',
|
|
1185
|
+
properties: {
|
|
1186
|
+
team_key: {
|
|
1187
|
+
type: 'string',
|
|
1188
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1189
|
+
pattern: '^frc\\d+$',
|
|
1190
|
+
},
|
|
1191
|
+
},
|
|
1192
|
+
required: ['team_key'],
|
|
1158
1193
|
},
|
|
1159
|
-
required: ['team_key'],
|
|
1160
1194
|
},
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
},
|
|
1195
|
+
{
|
|
1196
|
+
name: 'get_team_media_by_tag',
|
|
1197
|
+
description: 'Get media for a team filtered by tag',
|
|
1198
|
+
inputSchema: {
|
|
1199
|
+
type: 'object',
|
|
1200
|
+
properties: {
|
|
1201
|
+
team_key: {
|
|
1202
|
+
type: 'string',
|
|
1203
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1204
|
+
pattern: '^frc\\d+$',
|
|
1205
|
+
},
|
|
1206
|
+
media_tag: {
|
|
1207
|
+
type: 'string',
|
|
1208
|
+
description: 'Media tag to filter by',
|
|
1209
|
+
},
|
|
1210
|
+
},
|
|
1211
|
+
required: ['team_key', 'media_tag'],
|
|
1177
1212
|
},
|
|
1178
|
-
required: ['team_key', 'media_tag'],
|
|
1179
1213
|
},
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
},
|
|
1214
|
+
{
|
|
1215
|
+
name: 'get_team_media_by_tag_year',
|
|
1216
|
+
description: 'Get media for a team filtered by tag and year',
|
|
1217
|
+
inputSchema: {
|
|
1218
|
+
type: 'object',
|
|
1219
|
+
properties: {
|
|
1220
|
+
team_key: {
|
|
1221
|
+
type: 'string',
|
|
1222
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1223
|
+
pattern: '^frc\\d+$',
|
|
1224
|
+
},
|
|
1225
|
+
media_tag: {
|
|
1226
|
+
type: 'string',
|
|
1227
|
+
description: 'Media tag to filter by',
|
|
1228
|
+
},
|
|
1229
|
+
year: {
|
|
1230
|
+
type: 'number',
|
|
1231
|
+
description: 'Competition year',
|
|
1232
|
+
minimum: 1992,
|
|
1233
|
+
maximum: new Date().getFullYear() + 1,
|
|
1234
|
+
},
|
|
1235
|
+
},
|
|
1236
|
+
required: ['team_key', 'media_tag', 'year'],
|
|
1202
1237
|
},
|
|
1203
|
-
required: ['team_key', 'media_tag', 'year'],
|
|
1204
1238
|
},
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
},
|
|
1239
|
+
{
|
|
1240
|
+
name: 'get_event_teams_simple',
|
|
1241
|
+
description: 'Get simplified teams participating in an event',
|
|
1242
|
+
inputSchema: {
|
|
1243
|
+
type: 'object',
|
|
1244
|
+
properties: {
|
|
1245
|
+
event_key: {
|
|
1246
|
+
type: 'string',
|
|
1247
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1248
|
+
},
|
|
1249
|
+
},
|
|
1250
|
+
required: ['event_key'],
|
|
1216
1251
|
},
|
|
1217
|
-
required: ['event_key'],
|
|
1218
1252
|
},
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
},
|
|
1253
|
+
{
|
|
1254
|
+
name: 'get_event_teams_keys',
|
|
1255
|
+
description: 'Get team keys participating in an event',
|
|
1256
|
+
inputSchema: {
|
|
1257
|
+
type: 'object',
|
|
1258
|
+
properties: {
|
|
1259
|
+
event_key: {
|
|
1260
|
+
type: 'string',
|
|
1261
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1262
|
+
},
|
|
1263
|
+
},
|
|
1264
|
+
required: ['event_key'],
|
|
1230
1265
|
},
|
|
1231
|
-
required: ['event_key'],
|
|
1232
1266
|
},
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
},
|
|
1267
|
+
{
|
|
1268
|
+
name: 'get_event_matches_simple',
|
|
1269
|
+
description: 'Get simplified matches for an event',
|
|
1270
|
+
inputSchema: {
|
|
1271
|
+
type: 'object',
|
|
1272
|
+
properties: {
|
|
1273
|
+
event_key: {
|
|
1274
|
+
type: 'string',
|
|
1275
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1276
|
+
},
|
|
1277
|
+
},
|
|
1278
|
+
required: ['event_key'],
|
|
1244
1279
|
},
|
|
1245
|
-
required: ['event_key'],
|
|
1246
1280
|
},
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
},
|
|
1281
|
+
{
|
|
1282
|
+
name: 'get_event_matches_keys',
|
|
1283
|
+
description: 'Get match keys for an event',
|
|
1284
|
+
inputSchema: {
|
|
1285
|
+
type: 'object',
|
|
1286
|
+
properties: {
|
|
1287
|
+
event_key: {
|
|
1288
|
+
type: 'string',
|
|
1289
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1290
|
+
},
|
|
1291
|
+
},
|
|
1292
|
+
required: ['event_key'],
|
|
1258
1293
|
},
|
|
1259
|
-
required: ['event_key'],
|
|
1260
1294
|
},
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
},
|
|
1295
|
+
{
|
|
1296
|
+
name: 'get_event_predictions',
|
|
1297
|
+
description: 'Get TBA-generated predictions for an event',
|
|
1298
|
+
inputSchema: {
|
|
1299
|
+
type: 'object',
|
|
1300
|
+
properties: {
|
|
1301
|
+
event_key: {
|
|
1302
|
+
type: 'string',
|
|
1303
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1304
|
+
},
|
|
1305
|
+
},
|
|
1306
|
+
required: ['event_key'],
|
|
1272
1307
|
},
|
|
1273
|
-
required: ['event_key'],
|
|
1274
1308
|
},
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
},
|
|
1309
|
+
{
|
|
1310
|
+
name: 'get_match_zebra',
|
|
1311
|
+
description: 'Get Zebra MotionWorks data for a match',
|
|
1312
|
+
inputSchema: {
|
|
1313
|
+
type: 'object',
|
|
1314
|
+
properties: {
|
|
1315
|
+
match_key: {
|
|
1316
|
+
type: 'string',
|
|
1317
|
+
description: 'Match key (e.g., 2023casj_qm1)',
|
|
1318
|
+
},
|
|
1319
|
+
},
|
|
1320
|
+
required: ['match_key'],
|
|
1286
1321
|
},
|
|
1287
|
-
required: ['match_key'],
|
|
1288
1322
|
},
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
},
|
|
1323
|
+
{
|
|
1324
|
+
name: 'get_team_history',
|
|
1325
|
+
description: 'Get historical data for a team across all years',
|
|
1326
|
+
inputSchema: {
|
|
1327
|
+
type: 'object',
|
|
1328
|
+
properties: {
|
|
1329
|
+
team_key: {
|
|
1330
|
+
type: 'string',
|
|
1331
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1332
|
+
pattern: '^frc\\d+$',
|
|
1333
|
+
},
|
|
1334
|
+
},
|
|
1335
|
+
required: ['team_key'],
|
|
1301
1336
|
},
|
|
1302
|
-
required: ['team_key'],
|
|
1303
1337
|
},
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
},
|
|
1338
|
+
{
|
|
1339
|
+
name: 'get_team_event_statuses',
|
|
1340
|
+
description: 'Get team event statuses for all events in a year',
|
|
1341
|
+
inputSchema: {
|
|
1342
|
+
type: 'object',
|
|
1343
|
+
properties: {
|
|
1344
|
+
team_key: {
|
|
1345
|
+
type: 'string',
|
|
1346
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1347
|
+
pattern: '^frc\\d+$',
|
|
1348
|
+
},
|
|
1349
|
+
year: {
|
|
1350
|
+
type: 'number',
|
|
1351
|
+
description: 'Competition year',
|
|
1352
|
+
minimum: 1992,
|
|
1353
|
+
maximum: new Date().getFullYear() + 1,
|
|
1354
|
+
},
|
|
1355
|
+
},
|
|
1356
|
+
required: ['team_key', 'year'],
|
|
1322
1357
|
},
|
|
1323
|
-
required: ['team_key', 'year'],
|
|
1324
1358
|
},
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
},
|
|
1359
|
+
{
|
|
1360
|
+
name: 'get_team_event_matches_simple',
|
|
1361
|
+
description: 'Get simplified matches for a team at a specific event',
|
|
1362
|
+
inputSchema: {
|
|
1363
|
+
type: 'object',
|
|
1364
|
+
properties: {
|
|
1365
|
+
team_key: {
|
|
1366
|
+
type: 'string',
|
|
1367
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1368
|
+
pattern: '^frc\\d+$',
|
|
1369
|
+
},
|
|
1370
|
+
event_key: {
|
|
1371
|
+
type: 'string',
|
|
1372
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1373
|
+
},
|
|
1374
|
+
},
|
|
1375
|
+
required: ['team_key', 'event_key'],
|
|
1341
1376
|
},
|
|
1342
|
-
required: ['team_key', 'event_key'],
|
|
1343
1377
|
},
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
},
|
|
1378
|
+
{
|
|
1379
|
+
name: 'get_team_event_matches_keys',
|
|
1380
|
+
description: 'Get match keys for a team at a specific event',
|
|
1381
|
+
inputSchema: {
|
|
1382
|
+
type: 'object',
|
|
1383
|
+
properties: {
|
|
1384
|
+
team_key: {
|
|
1385
|
+
type: 'string',
|
|
1386
|
+
description: 'Team key in format frcXXXX (e.g., frc86)',
|
|
1387
|
+
pattern: '^frc\\d+$',
|
|
1388
|
+
},
|
|
1389
|
+
event_key: {
|
|
1390
|
+
type: 'string',
|
|
1391
|
+
description: 'Event key (e.g., 2023casj)',
|
|
1392
|
+
},
|
|
1393
|
+
},
|
|
1394
|
+
required: ['team_key', 'event_key'],
|
|
1360
1395
|
},
|
|
1361
|
-
required: ['team_key', 'event_key'],
|
|
1362
1396
|
},
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
},
|
|
1397
|
+
{
|
|
1398
|
+
name: 'get_district_events',
|
|
1399
|
+
description: 'Get events in a specific district',
|
|
1400
|
+
inputSchema: {
|
|
1401
|
+
type: 'object',
|
|
1402
|
+
properties: {
|
|
1403
|
+
district_key: {
|
|
1404
|
+
type: 'string',
|
|
1405
|
+
description: 'District key (e.g., 2023fim)',
|
|
1406
|
+
},
|
|
1407
|
+
},
|
|
1408
|
+
required: ['district_key'],
|
|
1374
1409
|
},
|
|
1375
|
-
required: ['district_key'],
|
|
1376
1410
|
},
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
},
|
|
1411
|
+
{
|
|
1412
|
+
name: 'get_district_events_simple',
|
|
1413
|
+
description: 'Get simplified events in a specific district',
|
|
1414
|
+
inputSchema: {
|
|
1415
|
+
type: 'object',
|
|
1416
|
+
properties: {
|
|
1417
|
+
district_key: {
|
|
1418
|
+
type: 'string',
|
|
1419
|
+
description: 'District key (e.g., 2023fim)',
|
|
1420
|
+
},
|
|
1421
|
+
},
|
|
1422
|
+
required: ['district_key'],
|
|
1388
1423
|
},
|
|
1389
|
-
required: ['district_key'],
|
|
1390
1424
|
},
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
},
|
|
1425
|
+
{
|
|
1426
|
+
name: 'get_district_events_keys',
|
|
1427
|
+
description: 'Get event keys in a specific district',
|
|
1428
|
+
inputSchema: {
|
|
1429
|
+
type: 'object',
|
|
1430
|
+
properties: {
|
|
1431
|
+
district_key: {
|
|
1432
|
+
type: 'string',
|
|
1433
|
+
description: 'District key (e.g., 2023fim)',
|
|
1434
|
+
},
|
|
1435
|
+
},
|
|
1436
|
+
required: ['district_key'],
|
|
1402
1437
|
},
|
|
1403
|
-
required: ['district_key'],
|
|
1404
1438
|
},
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
},
|
|
1439
|
+
{
|
|
1440
|
+
name: 'get_district_teams',
|
|
1441
|
+
description: 'Get teams in a specific district',
|
|
1442
|
+
inputSchema: {
|
|
1443
|
+
type: 'object',
|
|
1444
|
+
properties: {
|
|
1445
|
+
district_key: {
|
|
1446
|
+
type: 'string',
|
|
1447
|
+
description: 'District key (e.g., 2023fim)',
|
|
1448
|
+
},
|
|
1449
|
+
},
|
|
1450
|
+
required: ['district_key'],
|
|
1416
1451
|
},
|
|
1417
|
-
required: ['district_key'],
|
|
1418
1452
|
},
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
},
|
|
1453
|
+
{
|
|
1454
|
+
name: 'get_district_teams_simple',
|
|
1455
|
+
description: 'Get simplified teams in a specific district',
|
|
1456
|
+
inputSchema: {
|
|
1457
|
+
type: 'object',
|
|
1458
|
+
properties: {
|
|
1459
|
+
district_key: {
|
|
1460
|
+
type: 'string',
|
|
1461
|
+
description: 'District key (e.g., 2023fim)',
|
|
1462
|
+
},
|
|
1463
|
+
},
|
|
1464
|
+
required: ['district_key'],
|
|
1430
1465
|
},
|
|
1431
|
-
required: ['district_key'],
|
|
1432
1466
|
},
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
},
|
|
1467
|
+
{
|
|
1468
|
+
name: 'get_district_teams_keys',
|
|
1469
|
+
description: 'Get team keys in a specific district',
|
|
1470
|
+
inputSchema: {
|
|
1471
|
+
type: 'object',
|
|
1472
|
+
properties: {
|
|
1473
|
+
district_key: {
|
|
1474
|
+
type: 'string',
|
|
1475
|
+
description: 'District key (e.g., 2023fim)',
|
|
1476
|
+
},
|
|
1477
|
+
},
|
|
1478
|
+
required: ['district_key'],
|
|
1444
1479
|
},
|
|
1445
|
-
required: ['district_key'],
|
|
1446
1480
|
},
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
};
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
team_key
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
year
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
year
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
year
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
year
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
{
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
{
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
1481
|
+
],
|
|
1482
|
+
};
|
|
1483
|
+
});
|
|
1484
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
1485
|
+
const { name, arguments: args } = request.params;
|
|
1486
|
+
console.error(`Processing tool request: ${name}`);
|
|
1487
|
+
try {
|
|
1488
|
+
switch (name) {
|
|
1489
|
+
case 'get_team': {
|
|
1490
|
+
const { team_key } = z
|
|
1491
|
+
.object({ team_key: TeamKeySchema })
|
|
1492
|
+
.parse(args);
|
|
1493
|
+
const data = await makeApiRequest(`/team/${team_key}`);
|
|
1494
|
+
const team = TeamSchema.parse(data);
|
|
1495
|
+
return {
|
|
1496
|
+
content: [
|
|
1497
|
+
{
|
|
1498
|
+
type: 'text',
|
|
1499
|
+
text: JSON.stringify(team, null, 2),
|
|
1500
|
+
},
|
|
1501
|
+
],
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
case 'get_team_events': {
|
|
1505
|
+
const { team_key, year } = z
|
|
1506
|
+
.object({
|
|
1507
|
+
team_key: TeamKeySchema,
|
|
1508
|
+
year: YearSchema,
|
|
1509
|
+
})
|
|
1510
|
+
.parse(args);
|
|
1511
|
+
const data = await makeApiRequest(`/team/${team_key}/events/${year}`);
|
|
1512
|
+
const events = z.array(EventSchema).parse(data);
|
|
1513
|
+
return {
|
|
1514
|
+
content: [
|
|
1515
|
+
{
|
|
1516
|
+
type: 'text',
|
|
1517
|
+
text: JSON.stringify(events, null, 2),
|
|
1518
|
+
},
|
|
1519
|
+
],
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
case 'get_team_awards': {
|
|
1523
|
+
const { team_key, year } = z
|
|
1524
|
+
.object({
|
|
1525
|
+
team_key: TeamKeySchema,
|
|
1526
|
+
year: YearSchema,
|
|
1527
|
+
})
|
|
1528
|
+
.parse(args);
|
|
1529
|
+
const data = await makeApiRequest(`/team/${team_key}/awards/${year}`);
|
|
1530
|
+
const awards = z.array(AwardSchema).parse(data);
|
|
1531
|
+
return {
|
|
1532
|
+
content: [
|
|
1533
|
+
{
|
|
1534
|
+
type: 'text',
|
|
1535
|
+
text: JSON.stringify(awards, null, 2),
|
|
1536
|
+
},
|
|
1537
|
+
],
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
case 'get_team_matches': {
|
|
1541
|
+
const { team_key, year } = z
|
|
1542
|
+
.object({
|
|
1543
|
+
team_key: TeamKeySchema,
|
|
1544
|
+
year: YearSchema,
|
|
1545
|
+
})
|
|
1546
|
+
.parse(args);
|
|
1547
|
+
const data = await makeApiRequest(`/team/${team_key}/matches/${year}`);
|
|
1548
|
+
const matches = z.array(MatchSchema).parse(data);
|
|
1549
|
+
return {
|
|
1550
|
+
content: [
|
|
1551
|
+
{
|
|
1552
|
+
type: 'text',
|
|
1553
|
+
text: JSON.stringify(matches, null, 2),
|
|
1554
|
+
},
|
|
1555
|
+
],
|
|
1556
|
+
};
|
|
1557
|
+
}
|
|
1558
|
+
case 'get_events': {
|
|
1559
|
+
const { year } = z.object({ year: YearSchema }).parse(args);
|
|
1560
|
+
const data = await makeApiRequest(`/events/${year}`);
|
|
1561
|
+
const events = z.array(EventSchema).parse(data);
|
|
1562
|
+
return {
|
|
1563
|
+
content: [
|
|
1564
|
+
{
|
|
1565
|
+
type: 'text',
|
|
1566
|
+
text: JSON.stringify(events, null, 2),
|
|
1567
|
+
},
|
|
1568
|
+
],
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
case 'get_event': {
|
|
1572
|
+
const { event_key } = z
|
|
1573
|
+
.object({ event_key: EventKeySchema })
|
|
1574
|
+
.parse(args);
|
|
1575
|
+
const data = await makeApiRequest(`/event/${event_key}`);
|
|
1576
|
+
const event = EventSchema.parse(data);
|
|
1577
|
+
return {
|
|
1578
|
+
content: [
|
|
1579
|
+
{
|
|
1580
|
+
type: 'text',
|
|
1581
|
+
text: JSON.stringify(event, null, 2),
|
|
1582
|
+
},
|
|
1583
|
+
],
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
case 'get_event_teams': {
|
|
1587
|
+
const { event_key } = z
|
|
1588
|
+
.object({ event_key: EventKeySchema })
|
|
1589
|
+
.parse(args);
|
|
1590
|
+
const data = await makeApiRequest(`/event/${event_key}/teams`);
|
|
1591
|
+
const teams = z.array(TeamSchema).parse(data);
|
|
1592
|
+
return {
|
|
1593
|
+
content: [
|
|
1594
|
+
{
|
|
1595
|
+
type: 'text',
|
|
1596
|
+
text: JSON.stringify(teams, null, 2),
|
|
1597
|
+
},
|
|
1598
|
+
],
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
case 'get_event_rankings': {
|
|
1602
|
+
const { event_key } = z
|
|
1603
|
+
.object({ event_key: EventKeySchema })
|
|
1604
|
+
.parse(args);
|
|
1605
|
+
const data = await makeApiRequest(`/event/${event_key}/rankings`);
|
|
1606
|
+
const rankings = RankingSchema.parse(data);
|
|
1607
|
+
return {
|
|
1608
|
+
content: [
|
|
1609
|
+
{
|
|
1610
|
+
type: 'text',
|
|
1611
|
+
text: JSON.stringify(rankings, null, 2),
|
|
1612
|
+
},
|
|
1613
|
+
],
|
|
1614
|
+
};
|
|
1615
|
+
}
|
|
1616
|
+
case 'get_event_matches': {
|
|
1617
|
+
const { event_key } = z
|
|
1618
|
+
.object({ event_key: EventKeySchema })
|
|
1619
|
+
.parse(args);
|
|
1620
|
+
const data = await makeApiRequest(`/event/${event_key}/matches`);
|
|
1621
|
+
const matches = z.array(MatchSchema).parse(data);
|
|
1622
|
+
return {
|
|
1623
|
+
content: [
|
|
1624
|
+
{
|
|
1625
|
+
type: 'text',
|
|
1626
|
+
text: JSON.stringify(matches, null, 2),
|
|
1627
|
+
},
|
|
1628
|
+
],
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
1631
|
+
case 'get_event_alliances': {
|
|
1632
|
+
const { event_key } = z
|
|
1633
|
+
.object({ event_key: EventKeySchema })
|
|
1634
|
+
.parse(args);
|
|
1635
|
+
const data = await makeApiRequest(`/event/${event_key}/alliances`);
|
|
1636
|
+
const alliances = z.array(AllianceSchema).parse(data);
|
|
1637
|
+
return {
|
|
1638
|
+
content: [
|
|
1639
|
+
{
|
|
1640
|
+
type: 'text',
|
|
1641
|
+
text: JSON.stringify(alliances, null, 2),
|
|
1642
|
+
},
|
|
1643
|
+
],
|
|
1644
|
+
};
|
|
1645
|
+
}
|
|
1646
|
+
case 'get_event_insights': {
|
|
1647
|
+
const { event_key } = z
|
|
1648
|
+
.object({ event_key: EventKeySchema })
|
|
1649
|
+
.parse(args);
|
|
1650
|
+
const data = await makeApiRequest(`/event/${event_key}/insights`);
|
|
1651
|
+
const insights = InsightsSchema.parse(data);
|
|
1652
|
+
return {
|
|
1653
|
+
content: [
|
|
1654
|
+
{
|
|
1655
|
+
type: 'text',
|
|
1656
|
+
text: JSON.stringify(insights, null, 2),
|
|
1657
|
+
},
|
|
1658
|
+
],
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
case 'get_event_district_points': {
|
|
1662
|
+
const { event_key } = z
|
|
1663
|
+
.object({ event_key: EventKeySchema })
|
|
1664
|
+
.parse(args);
|
|
1665
|
+
const data = await makeApiRequest(`/event/${event_key}/district_points`);
|
|
1666
|
+
const districtPoints = DistrictPointsSchema.parse(data);
|
|
1667
|
+
return {
|
|
1668
|
+
content: [
|
|
1669
|
+
{
|
|
1670
|
+
type: 'text',
|
|
1671
|
+
text: JSON.stringify(districtPoints, null, 2),
|
|
1672
|
+
},
|
|
1673
|
+
],
|
|
1674
|
+
};
|
|
1675
|
+
}
|
|
1676
|
+
case 'get_team_years_participated': {
|
|
1677
|
+
const { team_key } = z
|
|
1678
|
+
.object({ team_key: TeamKeySchema })
|
|
1679
|
+
.parse(args);
|
|
1680
|
+
const data = await makeApiRequest(`/team/${team_key}/years_participated`);
|
|
1681
|
+
const years = z.array(z.number()).parse(data);
|
|
1682
|
+
return {
|
|
1683
|
+
content: [
|
|
1684
|
+
{
|
|
1685
|
+
type: 'text',
|
|
1686
|
+
text: JSON.stringify(years, null, 2),
|
|
1687
|
+
},
|
|
1688
|
+
],
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
case 'get_team_districts': {
|
|
1692
|
+
const { team_key } = z
|
|
1693
|
+
.object({ team_key: TeamKeySchema })
|
|
1694
|
+
.parse(args);
|
|
1695
|
+
const data = await makeApiRequest(`/team/${team_key}/districts`);
|
|
1696
|
+
const districts = z.array(DistrictSchema).parse(data);
|
|
1697
|
+
return {
|
|
1698
|
+
content: [
|
|
1699
|
+
{
|
|
1700
|
+
type: 'text',
|
|
1701
|
+
text: JSON.stringify(districts, null, 2),
|
|
1702
|
+
},
|
|
1703
|
+
],
|
|
1704
|
+
};
|
|
1705
|
+
}
|
|
1706
|
+
case 'get_team_robots': {
|
|
1707
|
+
const { team_key } = z
|
|
1708
|
+
.object({ team_key: TeamKeySchema })
|
|
1709
|
+
.parse(args);
|
|
1710
|
+
const data = await makeApiRequest(`/team/${team_key}/robots`);
|
|
1711
|
+
const robots = z.array(RobotSchema).parse(data);
|
|
1712
|
+
return {
|
|
1713
|
+
content: [
|
|
1714
|
+
{
|
|
1715
|
+
type: 'text',
|
|
1716
|
+
text: JSON.stringify(robots, null, 2),
|
|
1717
|
+
},
|
|
1718
|
+
],
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1721
|
+
case 'get_team_media': {
|
|
1722
|
+
const { team_key, year } = z
|
|
1723
|
+
.object({
|
|
1724
|
+
team_key: TeamKeySchema,
|
|
1725
|
+
year: YearSchema,
|
|
1726
|
+
})
|
|
1727
|
+
.parse(args);
|
|
1728
|
+
const data = await makeApiRequest(`/team/${team_key}/media/${year}`);
|
|
1729
|
+
const media = z.array(MediaSchema).parse(data);
|
|
1730
|
+
return {
|
|
1731
|
+
content: [
|
|
1732
|
+
{
|
|
1733
|
+
type: 'text',
|
|
1734
|
+
text: JSON.stringify(media, null, 2),
|
|
1735
|
+
},
|
|
1736
|
+
],
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
case 'get_team_event_matches': {
|
|
1740
|
+
const { team_key, event_key } = z
|
|
1741
|
+
.object({
|
|
1742
|
+
team_key: TeamKeySchema,
|
|
1743
|
+
event_key: EventKeySchema,
|
|
1744
|
+
})
|
|
1745
|
+
.parse(args);
|
|
1746
|
+
const data = await makeApiRequest(`/team/${team_key}/event/${event_key}/matches`);
|
|
1747
|
+
const matches = z.array(MatchSchema).parse(data);
|
|
1748
|
+
return {
|
|
1749
|
+
content: [
|
|
1750
|
+
{
|
|
1751
|
+
type: 'text',
|
|
1752
|
+
text: JSON.stringify(matches, null, 2),
|
|
1753
|
+
},
|
|
1754
|
+
],
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
case 'get_teams': {
|
|
1758
|
+
const { page_num } = z
|
|
1759
|
+
.object({ page_num: z.number().min(0) })
|
|
1760
|
+
.parse(args);
|
|
1761
|
+
const data = await makeApiRequest(`/teams/${page_num}`);
|
|
1762
|
+
const teams = z.array(TeamSchema).parse(data);
|
|
1763
|
+
return {
|
|
1764
|
+
content: [
|
|
1765
|
+
{
|
|
1766
|
+
type: 'text',
|
|
1767
|
+
text: JSON.stringify(teams, null, 2),
|
|
1768
|
+
},
|
|
1769
|
+
],
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
case 'get_status': {
|
|
1773
|
+
const data = await makeApiRequest('/status');
|
|
1774
|
+
const status = StatusSchema.parse(data);
|
|
1775
|
+
return {
|
|
1776
|
+
content: [
|
|
1777
|
+
{
|
|
1778
|
+
type: 'text',
|
|
1779
|
+
text: JSON.stringify(status, null, 2),
|
|
1780
|
+
},
|
|
1781
|
+
],
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1784
|
+
case 'get_match': {
|
|
1785
|
+
const { match_key } = z
|
|
1786
|
+
.object({ match_key: z.string() })
|
|
1787
|
+
.parse(args);
|
|
1788
|
+
const data = await makeApiRequest(`/match/${match_key}`);
|
|
1789
|
+
const match = MatchSchema.parse(data);
|
|
1790
|
+
return {
|
|
1791
|
+
content: [
|
|
1792
|
+
{
|
|
1793
|
+
type: 'text',
|
|
1794
|
+
text: JSON.stringify(match, null, 2),
|
|
1795
|
+
},
|
|
1796
|
+
],
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
case 'get_event_oprs': {
|
|
1800
|
+
const { event_key } = z
|
|
1801
|
+
.object({ event_key: EventKeySchema })
|
|
1802
|
+
.parse(args);
|
|
1803
|
+
const data = await makeApiRequest(`/event/${event_key}/oprs`);
|
|
1804
|
+
const oprs = EventOPRsSchema.parse(data);
|
|
1805
|
+
return {
|
|
1806
|
+
content: [
|
|
1807
|
+
{
|
|
1808
|
+
type: 'text',
|
|
1809
|
+
text: JSON.stringify(oprs, null, 2),
|
|
1810
|
+
},
|
|
1811
|
+
],
|
|
1812
|
+
};
|
|
1813
|
+
}
|
|
1814
|
+
case 'get_event_awards': {
|
|
1815
|
+
const { event_key } = z
|
|
1816
|
+
.object({ event_key: EventKeySchema })
|
|
1817
|
+
.parse(args);
|
|
1818
|
+
const data = await makeApiRequest(`/event/${event_key}/awards`);
|
|
1819
|
+
const awards = z.array(AwardSchema).parse(data);
|
|
1820
|
+
return {
|
|
1821
|
+
content: [
|
|
1822
|
+
{
|
|
1823
|
+
type: 'text',
|
|
1824
|
+
text: JSON.stringify(awards, null, 2),
|
|
1825
|
+
},
|
|
1826
|
+
],
|
|
1827
|
+
};
|
|
1828
|
+
}
|
|
1829
|
+
case 'get_team_awards_all': {
|
|
1830
|
+
const { team_key } = z
|
|
1831
|
+
.object({ team_key: TeamKeySchema })
|
|
1832
|
+
.parse(args);
|
|
1833
|
+
const data = await makeApiRequest(`/team/${team_key}/awards`);
|
|
1834
|
+
const awards = z.array(AwardSchema).parse(data);
|
|
1835
|
+
return {
|
|
1836
|
+
content: [
|
|
1837
|
+
{
|
|
1838
|
+
type: 'text',
|
|
1839
|
+
text: JSON.stringify(awards, null, 2),
|
|
1840
|
+
},
|
|
1841
|
+
],
|
|
1842
|
+
};
|
|
1843
|
+
}
|
|
1844
|
+
case 'get_team_events_all': {
|
|
1845
|
+
const { team_key } = z
|
|
1846
|
+
.object({ team_key: TeamKeySchema })
|
|
1847
|
+
.parse(args);
|
|
1848
|
+
const data = await makeApiRequest(`/team/${team_key}/events`);
|
|
1849
|
+
const events = z.array(EventSchema).parse(data);
|
|
1850
|
+
return {
|
|
1851
|
+
content: [
|
|
1852
|
+
{
|
|
1853
|
+
type: 'text',
|
|
1854
|
+
text: JSON.stringify(events, null, 2),
|
|
1855
|
+
},
|
|
1856
|
+
],
|
|
1857
|
+
};
|
|
1858
|
+
}
|
|
1859
|
+
case 'get_team_event_status': {
|
|
1860
|
+
const { team_key, event_key } = z
|
|
1861
|
+
.object({
|
|
1862
|
+
team_key: TeamKeySchema,
|
|
1863
|
+
event_key: EventKeySchema,
|
|
1864
|
+
})
|
|
1865
|
+
.parse(args);
|
|
1866
|
+
const data = await makeApiRequest(`/team/${team_key}/event/${event_key}/status`);
|
|
1867
|
+
const status = TeamEventStatusSchema.parse(data);
|
|
1868
|
+
return {
|
|
1869
|
+
content: [
|
|
1870
|
+
{
|
|
1871
|
+
type: 'text',
|
|
1872
|
+
text: JSON.stringify(status, null, 2),
|
|
1873
|
+
},
|
|
1874
|
+
],
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1877
|
+
case 'get_districts': {
|
|
1878
|
+
const { year } = z.object({ year: YearSchema }).parse(args);
|
|
1879
|
+
const data = await makeApiRequest(`/districts/${year}`);
|
|
1880
|
+
const districts = z.array(DistrictSchema).parse(data);
|
|
1881
|
+
return {
|
|
1882
|
+
content: [
|
|
1883
|
+
{
|
|
1884
|
+
type: 'text',
|
|
1885
|
+
text: JSON.stringify(districts, null, 2),
|
|
1886
|
+
},
|
|
1887
|
+
],
|
|
1888
|
+
};
|
|
1889
|
+
}
|
|
1890
|
+
case 'get_district_rankings': {
|
|
1891
|
+
const { district_key } = z
|
|
1892
|
+
.object({ district_key: z.string() })
|
|
1893
|
+
.parse(args);
|
|
1894
|
+
const data = await makeApiRequest(`/district/${district_key}/rankings`);
|
|
1895
|
+
const rankings = z.array(DistrictRankingSchema).parse(data);
|
|
1896
|
+
return {
|
|
1897
|
+
content: [
|
|
1898
|
+
{
|
|
1899
|
+
type: 'text',
|
|
1900
|
+
text: JSON.stringify(rankings, null, 2),
|
|
1901
|
+
},
|
|
1902
|
+
],
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
case 'get_teams_simple': {
|
|
1906
|
+
const { page_num } = z
|
|
1907
|
+
.object({ page_num: z.number().min(0) })
|
|
1908
|
+
.parse(args);
|
|
1909
|
+
const data = await makeApiRequest(`/teams/${page_num}/simple`);
|
|
1910
|
+
const teams = z.array(TeamSimpleSchema).parse(data);
|
|
1911
|
+
return {
|
|
1912
|
+
content: [
|
|
1913
|
+
{
|
|
1914
|
+
type: 'text',
|
|
1915
|
+
text: JSON.stringify(teams, null, 2),
|
|
1916
|
+
},
|
|
1917
|
+
],
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
case 'get_teams_keys': {
|
|
1921
|
+
const { page_num } = z
|
|
1922
|
+
.object({ page_num: z.number().min(0) })
|
|
1923
|
+
.parse(args);
|
|
1924
|
+
const data = await makeApiRequest(`/teams/${page_num}/keys`);
|
|
1925
|
+
const keys = z.array(z.string()).parse(data);
|
|
1926
|
+
return {
|
|
1927
|
+
content: [
|
|
1928
|
+
{
|
|
1929
|
+
type: 'text',
|
|
1930
|
+
text: JSON.stringify(keys, null, 2),
|
|
1931
|
+
},
|
|
1932
|
+
],
|
|
1933
|
+
};
|
|
1934
|
+
}
|
|
1935
|
+
case 'get_teams_by_year': {
|
|
1936
|
+
const { year, page_num } = z
|
|
1937
|
+
.object({
|
|
1938
|
+
year: YearSchema,
|
|
1939
|
+
page_num: z.number().min(0),
|
|
1940
|
+
})
|
|
1941
|
+
.parse(args);
|
|
1942
|
+
const data = await makeApiRequest(`/teams/${year}/${page_num}`);
|
|
1943
|
+
const teams = z.array(TeamSchema).parse(data);
|
|
1944
|
+
return {
|
|
1945
|
+
content: [
|
|
1946
|
+
{
|
|
1947
|
+
type: 'text',
|
|
1948
|
+
text: JSON.stringify(teams, null, 2),
|
|
1949
|
+
},
|
|
1950
|
+
],
|
|
1951
|
+
};
|
|
1952
|
+
}
|
|
1953
|
+
case 'get_teams_by_year_simple': {
|
|
1954
|
+
const { year, page_num } = z
|
|
1955
|
+
.object({
|
|
1956
|
+
year: YearSchema,
|
|
1957
|
+
page_num: z.number().min(0),
|
|
1958
|
+
})
|
|
1959
|
+
.parse(args);
|
|
1960
|
+
const data = await makeApiRequest(`/teams/${year}/${page_num}/simple`);
|
|
1961
|
+
const teams = z.array(TeamSimpleSchema).parse(data);
|
|
1962
|
+
return {
|
|
1963
|
+
content: [
|
|
1964
|
+
{
|
|
1965
|
+
type: 'text',
|
|
1966
|
+
text: JSON.stringify(teams, null, 2),
|
|
1967
|
+
},
|
|
1968
|
+
],
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
case 'get_teams_by_year_keys': {
|
|
1972
|
+
const { year, page_num } = z
|
|
1973
|
+
.object({
|
|
1974
|
+
year: YearSchema,
|
|
1975
|
+
page_num: z.number().min(0),
|
|
1976
|
+
})
|
|
1977
|
+
.parse(args);
|
|
1978
|
+
const data = await makeApiRequest(`/teams/${year}/${page_num}/keys`);
|
|
1979
|
+
const keys = z.array(z.string()).parse(data);
|
|
1980
|
+
return {
|
|
1981
|
+
content: [
|
|
1982
|
+
{
|
|
1983
|
+
type: 'text',
|
|
1984
|
+
text: JSON.stringify(keys, null, 2),
|
|
1985
|
+
},
|
|
1986
|
+
],
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
case 'get_team_simple': {
|
|
1990
|
+
const { team_key } = z
|
|
1991
|
+
.object({ team_key: TeamKeySchema })
|
|
1992
|
+
.parse(args);
|
|
1993
|
+
const data = await makeApiRequest(`/team/${team_key}/simple`);
|
|
1994
|
+
const team = TeamSimpleSchema.parse(data);
|
|
1995
|
+
return {
|
|
1996
|
+
content: [
|
|
1997
|
+
{
|
|
1998
|
+
type: 'text',
|
|
1999
|
+
text: JSON.stringify(team, null, 2),
|
|
2000
|
+
},
|
|
2001
|
+
],
|
|
2002
|
+
};
|
|
2003
|
+
}
|
|
2004
|
+
case 'get_event_simple': {
|
|
2005
|
+
const { event_key } = z
|
|
2006
|
+
.object({ event_key: EventKeySchema })
|
|
2007
|
+
.parse(args);
|
|
2008
|
+
const data = await makeApiRequest(`/event/${event_key}/simple`);
|
|
2009
|
+
const event = EventSimpleSchema.parse(data);
|
|
2010
|
+
return {
|
|
2011
|
+
content: [
|
|
2012
|
+
{
|
|
2013
|
+
type: 'text',
|
|
2014
|
+
text: JSON.stringify(event, null, 2),
|
|
2015
|
+
},
|
|
2016
|
+
],
|
|
2017
|
+
};
|
|
2018
|
+
}
|
|
2019
|
+
case 'get_events_simple': {
|
|
2020
|
+
const { year } = z.object({ year: YearSchema }).parse(args);
|
|
2021
|
+
const data = await makeApiRequest(`/events/${year}/simple`);
|
|
2022
|
+
const events = z.array(EventSimpleSchema).parse(data);
|
|
2023
|
+
return {
|
|
2024
|
+
content: [
|
|
2025
|
+
{
|
|
2026
|
+
type: 'text',
|
|
2027
|
+
text: JSON.stringify(events, null, 2),
|
|
2028
|
+
},
|
|
2029
|
+
],
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
case 'get_events_keys': {
|
|
2033
|
+
const { year } = z.object({ year: YearSchema }).parse(args);
|
|
2034
|
+
const data = await makeApiRequest(`/events/${year}/keys`);
|
|
2035
|
+
const keys = z.array(z.string()).parse(data);
|
|
2036
|
+
return {
|
|
2037
|
+
content: [
|
|
2038
|
+
{
|
|
2039
|
+
type: 'text',
|
|
2040
|
+
text: JSON.stringify(keys, null, 2),
|
|
2041
|
+
},
|
|
2042
|
+
],
|
|
2043
|
+
};
|
|
2044
|
+
}
|
|
2045
|
+
case 'get_match_simple': {
|
|
2046
|
+
const { match_key } = z
|
|
2047
|
+
.object({ match_key: z.string() })
|
|
2048
|
+
.parse(args);
|
|
2049
|
+
const data = await makeApiRequest(`/match/${match_key}/simple`);
|
|
2050
|
+
const match = MatchSimpleSchema.parse(data);
|
|
2051
|
+
return {
|
|
2052
|
+
content: [
|
|
2053
|
+
{
|
|
2054
|
+
type: 'text',
|
|
2055
|
+
text: JSON.stringify(match, null, 2),
|
|
2056
|
+
},
|
|
2057
|
+
],
|
|
2058
|
+
};
|
|
2059
|
+
}
|
|
2060
|
+
case 'get_team_events_simple': {
|
|
2061
|
+
const { team_key, year } = z
|
|
2062
|
+
.object({
|
|
2063
|
+
team_key: TeamKeySchema,
|
|
2064
|
+
year: YearSchema,
|
|
2065
|
+
})
|
|
2066
|
+
.parse(args);
|
|
2067
|
+
const data = await makeApiRequest(`/team/${team_key}/events/${year}/simple`);
|
|
2068
|
+
const events = z.array(EventSimpleSchema).parse(data);
|
|
2069
|
+
return {
|
|
2070
|
+
content: [
|
|
2071
|
+
{
|
|
2072
|
+
type: 'text',
|
|
2073
|
+
text: JSON.stringify(events, null, 2),
|
|
2074
|
+
},
|
|
2075
|
+
],
|
|
2076
|
+
};
|
|
2077
|
+
}
|
|
2078
|
+
case 'get_team_events_keys': {
|
|
2079
|
+
const { team_key, year } = z
|
|
2080
|
+
.object({
|
|
2081
|
+
team_key: TeamKeySchema,
|
|
2082
|
+
year: YearSchema,
|
|
2083
|
+
})
|
|
2084
|
+
.parse(args);
|
|
2085
|
+
const data = await makeApiRequest(`/team/${team_key}/events/${year}/keys`);
|
|
2086
|
+
const keys = z.array(z.string()).parse(data);
|
|
2087
|
+
return {
|
|
2088
|
+
content: [
|
|
2089
|
+
{
|
|
2090
|
+
type: 'text',
|
|
2091
|
+
text: JSON.stringify(keys, null, 2),
|
|
2092
|
+
},
|
|
2093
|
+
],
|
|
2094
|
+
};
|
|
2095
|
+
}
|
|
2096
|
+
case 'get_team_event_awards': {
|
|
2097
|
+
const { team_key, event_key } = z
|
|
2098
|
+
.object({
|
|
2099
|
+
team_key: TeamKeySchema,
|
|
2100
|
+
event_key: EventKeySchema,
|
|
2101
|
+
})
|
|
2102
|
+
.parse(args);
|
|
2103
|
+
const data = await makeApiRequest(`/team/${team_key}/event/${event_key}/awards`);
|
|
2104
|
+
const awards = z.array(AwardSchema).parse(data);
|
|
2105
|
+
return {
|
|
2106
|
+
content: [
|
|
2107
|
+
{
|
|
2108
|
+
type: 'text',
|
|
2109
|
+
text: JSON.stringify(awards, null, 2),
|
|
2110
|
+
},
|
|
2111
|
+
],
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
case 'get_team_matches_simple': {
|
|
2115
|
+
const { team_key, year } = z
|
|
2116
|
+
.object({
|
|
2117
|
+
team_key: TeamKeySchema,
|
|
2118
|
+
year: YearSchema,
|
|
2119
|
+
})
|
|
2120
|
+
.parse(args);
|
|
2121
|
+
const data = await makeApiRequest(`/team/${team_key}/matches/${year}/simple`);
|
|
2122
|
+
const matches = z.array(MatchSimpleSchema).parse(data);
|
|
2123
|
+
return {
|
|
2124
|
+
content: [
|
|
2125
|
+
{
|
|
2126
|
+
type: 'text',
|
|
2127
|
+
text: JSON.stringify(matches, null, 2),
|
|
2128
|
+
},
|
|
2129
|
+
],
|
|
2130
|
+
};
|
|
2131
|
+
}
|
|
2132
|
+
case 'get_team_matches_keys': {
|
|
2133
|
+
const { team_key, year } = z
|
|
2134
|
+
.object({
|
|
2135
|
+
team_key: TeamKeySchema,
|
|
2136
|
+
year: YearSchema,
|
|
2137
|
+
})
|
|
2138
|
+
.parse(args);
|
|
2139
|
+
const data = await makeApiRequest(`/team/${team_key}/matches/${year}/keys`);
|
|
2140
|
+
const keys = z.array(z.string()).parse(data);
|
|
2141
|
+
return {
|
|
2142
|
+
content: [
|
|
2143
|
+
{
|
|
2144
|
+
type: 'text',
|
|
2145
|
+
text: JSON.stringify(keys, null, 2),
|
|
2146
|
+
},
|
|
2147
|
+
],
|
|
2148
|
+
};
|
|
2149
|
+
}
|
|
2150
|
+
case 'get_team_social_media': {
|
|
2151
|
+
const { team_key } = z
|
|
2152
|
+
.object({ team_key: TeamKeySchema })
|
|
2153
|
+
.parse(args);
|
|
2154
|
+
const data = await makeApiRequest(`/team/${team_key}/social_media`);
|
|
2155
|
+
const media = z.array(MediaSchema).parse(data);
|
|
2156
|
+
return {
|
|
2157
|
+
content: [
|
|
2158
|
+
{
|
|
2159
|
+
type: 'text',
|
|
2160
|
+
text: JSON.stringify(media, null, 2),
|
|
2161
|
+
},
|
|
2162
|
+
],
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2165
|
+
case 'get_team_media_by_tag': {
|
|
2166
|
+
const { team_key, media_tag } = z
|
|
2167
|
+
.object({
|
|
2168
|
+
team_key: TeamKeySchema,
|
|
2169
|
+
media_tag: z.string(),
|
|
2170
|
+
})
|
|
2171
|
+
.parse(args);
|
|
2172
|
+
const data = await makeApiRequest(`/team/${team_key}/media/tag/${media_tag}`);
|
|
2173
|
+
const media = z.array(MediaSchema).parse(data);
|
|
2174
|
+
return {
|
|
2175
|
+
content: [
|
|
2176
|
+
{
|
|
2177
|
+
type: 'text',
|
|
2178
|
+
text: JSON.stringify(media, null, 2),
|
|
2179
|
+
},
|
|
2180
|
+
],
|
|
2181
|
+
};
|
|
2182
|
+
}
|
|
2183
|
+
case 'get_team_media_by_tag_year': {
|
|
2184
|
+
const { team_key, media_tag, year } = z
|
|
2185
|
+
.object({
|
|
2186
|
+
team_key: TeamKeySchema,
|
|
2187
|
+
media_tag: z.string(),
|
|
2188
|
+
year: YearSchema,
|
|
2189
|
+
})
|
|
2190
|
+
.parse(args);
|
|
2191
|
+
const data = await makeApiRequest(`/team/${team_key}/media/tag/${media_tag}/${year}`);
|
|
2192
|
+
const media = z.array(MediaSchema).parse(data);
|
|
2193
|
+
return {
|
|
2194
|
+
content: [
|
|
2195
|
+
{
|
|
2196
|
+
type: 'text',
|
|
2197
|
+
text: JSON.stringify(media, null, 2),
|
|
2198
|
+
},
|
|
2199
|
+
],
|
|
2200
|
+
};
|
|
2201
|
+
}
|
|
2202
|
+
case 'get_event_teams_simple': {
|
|
2203
|
+
const { event_key } = z
|
|
2204
|
+
.object({ event_key: EventKeySchema })
|
|
2205
|
+
.parse(args);
|
|
2206
|
+
const data = await makeApiRequest(`/event/${event_key}/teams/simple`);
|
|
2207
|
+
const teams = z.array(TeamSimpleSchema).parse(data);
|
|
2208
|
+
return {
|
|
2209
|
+
content: [
|
|
2210
|
+
{
|
|
2211
|
+
type: 'text',
|
|
2212
|
+
text: JSON.stringify(teams, null, 2),
|
|
2213
|
+
},
|
|
2214
|
+
],
|
|
2215
|
+
};
|
|
2216
|
+
}
|
|
2217
|
+
case 'get_event_teams_keys': {
|
|
2218
|
+
const { event_key } = z
|
|
2219
|
+
.object({ event_key: EventKeySchema })
|
|
2220
|
+
.parse(args);
|
|
2221
|
+
const data = await makeApiRequest(`/event/${event_key}/teams/keys`);
|
|
2222
|
+
const keys = z.array(z.string()).parse(data);
|
|
2223
|
+
return {
|
|
2224
|
+
content: [
|
|
2225
|
+
{
|
|
2226
|
+
type: 'text',
|
|
2227
|
+
text: JSON.stringify(keys, null, 2),
|
|
2228
|
+
},
|
|
2229
|
+
],
|
|
2230
|
+
};
|
|
2231
|
+
}
|
|
2232
|
+
case 'get_event_matches_simple': {
|
|
2233
|
+
const { event_key } = z
|
|
2234
|
+
.object({ event_key: EventKeySchema })
|
|
2235
|
+
.parse(args);
|
|
2236
|
+
const data = await makeApiRequest(`/event/${event_key}/matches/simple`);
|
|
2237
|
+
const matches = z.array(MatchSimpleSchema).parse(data);
|
|
2238
|
+
return {
|
|
2239
|
+
content: [
|
|
2240
|
+
{
|
|
2241
|
+
type: 'text',
|
|
2242
|
+
text: JSON.stringify(matches, null, 2),
|
|
2243
|
+
},
|
|
2244
|
+
],
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
case 'get_event_matches_keys': {
|
|
2248
|
+
const { event_key } = z
|
|
2249
|
+
.object({ event_key: EventKeySchema })
|
|
2250
|
+
.parse(args);
|
|
2251
|
+
const data = await makeApiRequest(`/event/${event_key}/matches/keys`);
|
|
2252
|
+
const keys = z.array(z.string()).parse(data);
|
|
2253
|
+
return {
|
|
2254
|
+
content: [
|
|
2255
|
+
{
|
|
2256
|
+
type: 'text',
|
|
2257
|
+
text: JSON.stringify(keys, null, 2),
|
|
2258
|
+
},
|
|
2259
|
+
],
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
case 'get_team_history': {
|
|
2263
|
+
const { team_key } = z
|
|
2264
|
+
.object({ team_key: TeamKeySchema })
|
|
2265
|
+
.parse(args);
|
|
2266
|
+
const data = await makeApiRequest(`/team/${team_key}/history`);
|
|
2267
|
+
const history = TeamHistorySchema.parse(data);
|
|
2268
|
+
return {
|
|
2269
|
+
content: [
|
|
2270
|
+
{
|
|
2271
|
+
type: 'text',
|
|
2272
|
+
text: JSON.stringify(history, null, 2),
|
|
2273
|
+
},
|
|
2274
|
+
],
|
|
2275
|
+
};
|
|
2276
|
+
}
|
|
2277
|
+
case 'get_team_event_statuses': {
|
|
2278
|
+
const { team_key, year } = z
|
|
2279
|
+
.object({
|
|
2280
|
+
team_key: TeamKeySchema,
|
|
2281
|
+
year: YearSchema,
|
|
2282
|
+
})
|
|
2283
|
+
.parse(args);
|
|
2284
|
+
const data = await makeApiRequest(`/team/${team_key}/events/${year}/statuses`);
|
|
2285
|
+
const statuses = z
|
|
2286
|
+
.record(z.string(), TeamEventStatusSchema)
|
|
2287
|
+
.parse(data);
|
|
2288
|
+
return {
|
|
2289
|
+
content: [
|
|
2290
|
+
{
|
|
2291
|
+
type: 'text',
|
|
2292
|
+
text: JSON.stringify(statuses, null, 2),
|
|
2293
|
+
},
|
|
2294
|
+
],
|
|
2295
|
+
};
|
|
2296
|
+
}
|
|
2297
|
+
case 'get_team_event_matches_simple': {
|
|
2298
|
+
const { team_key, event_key } = z
|
|
2299
|
+
.object({
|
|
2300
|
+
team_key: TeamKeySchema,
|
|
2301
|
+
event_key: EventKeySchema,
|
|
2302
|
+
})
|
|
2303
|
+
.parse(args);
|
|
2304
|
+
const data = await makeApiRequest(`/team/${team_key}/event/${event_key}/matches/simple`);
|
|
2305
|
+
const matches = z.array(MatchSimpleSchema).parse(data);
|
|
2306
|
+
return {
|
|
2307
|
+
content: [
|
|
2308
|
+
{
|
|
2309
|
+
type: 'text',
|
|
2310
|
+
text: JSON.stringify(matches, null, 2),
|
|
2311
|
+
},
|
|
2312
|
+
],
|
|
2313
|
+
};
|
|
2314
|
+
}
|
|
2315
|
+
case 'get_team_event_matches_keys': {
|
|
2316
|
+
const { team_key, event_key } = z
|
|
2317
|
+
.object({
|
|
2318
|
+
team_key: TeamKeySchema,
|
|
2319
|
+
event_key: EventKeySchema,
|
|
2320
|
+
})
|
|
2321
|
+
.parse(args);
|
|
2322
|
+
const data = await makeApiRequest(`/team/${team_key}/event/${event_key}/matches/keys`);
|
|
2323
|
+
const keys = z.array(z.string()).parse(data);
|
|
2324
|
+
return {
|
|
2325
|
+
content: [
|
|
2326
|
+
{
|
|
2327
|
+
type: 'text',
|
|
2328
|
+
text: JSON.stringify(keys, null, 2),
|
|
2329
|
+
},
|
|
2330
|
+
],
|
|
2331
|
+
};
|
|
2332
|
+
}
|
|
2333
|
+
case 'get_district_events': {
|
|
2334
|
+
const { district_key } = z
|
|
2335
|
+
.object({ district_key: z.string() })
|
|
2336
|
+
.parse(args);
|
|
2337
|
+
const data = await makeApiRequest(`/district/${district_key}/events`);
|
|
2338
|
+
const events = z.array(EventSchema).parse(data);
|
|
2339
|
+
return {
|
|
2340
|
+
content: [
|
|
2341
|
+
{
|
|
2342
|
+
type: 'text',
|
|
2343
|
+
text: JSON.stringify(events, null, 2),
|
|
2344
|
+
},
|
|
2345
|
+
],
|
|
2346
|
+
};
|
|
2347
|
+
}
|
|
2348
|
+
case 'get_district_events_simple': {
|
|
2349
|
+
const { district_key } = z
|
|
2350
|
+
.object({ district_key: z.string() })
|
|
2351
|
+
.parse(args);
|
|
2352
|
+
const data = await makeApiRequest(`/district/${district_key}/events/simple`);
|
|
2353
|
+
const events = z.array(EventSimpleSchema).parse(data);
|
|
2354
|
+
return {
|
|
2355
|
+
content: [
|
|
2356
|
+
{
|
|
2357
|
+
type: 'text',
|
|
2358
|
+
text: JSON.stringify(events, null, 2),
|
|
2359
|
+
},
|
|
2360
|
+
],
|
|
2361
|
+
};
|
|
2362
|
+
}
|
|
2363
|
+
case 'get_district_events_keys': {
|
|
2364
|
+
const { district_key } = z
|
|
2365
|
+
.object({ district_key: z.string() })
|
|
2366
|
+
.parse(args);
|
|
2367
|
+
const data = await makeApiRequest(`/district/${district_key}/events/keys`);
|
|
2368
|
+
const keys = z.array(z.string()).parse(data);
|
|
2369
|
+
return {
|
|
2370
|
+
content: [
|
|
2371
|
+
{
|
|
2372
|
+
type: 'text',
|
|
2373
|
+
text: JSON.stringify(keys, null, 2),
|
|
2374
|
+
},
|
|
2375
|
+
],
|
|
2376
|
+
};
|
|
2377
|
+
}
|
|
2378
|
+
case 'get_district_teams': {
|
|
2379
|
+
const { district_key } = z
|
|
2380
|
+
.object({ district_key: z.string() })
|
|
2381
|
+
.parse(args);
|
|
2382
|
+
const data = await makeApiRequest(`/district/${district_key}/teams`);
|
|
2383
|
+
const teams = z.array(TeamSchema).parse(data);
|
|
2384
|
+
return {
|
|
2385
|
+
content: [
|
|
2386
|
+
{
|
|
2387
|
+
type: 'text',
|
|
2388
|
+
text: JSON.stringify(teams, null, 2),
|
|
2389
|
+
},
|
|
2390
|
+
],
|
|
2391
|
+
};
|
|
2392
|
+
}
|
|
2393
|
+
case 'get_district_teams_simple': {
|
|
2394
|
+
const { district_key } = z
|
|
2395
|
+
.object({ district_key: z.string() })
|
|
2396
|
+
.parse(args);
|
|
2397
|
+
const data = await makeApiRequest(`/district/${district_key}/teams/simple`);
|
|
2398
|
+
const teams = z.array(TeamSimpleSchema).parse(data);
|
|
2399
|
+
return {
|
|
2400
|
+
content: [
|
|
2401
|
+
{
|
|
2402
|
+
type: 'text',
|
|
2403
|
+
text: JSON.stringify(teams, null, 2),
|
|
2404
|
+
},
|
|
2405
|
+
],
|
|
2406
|
+
};
|
|
2407
|
+
}
|
|
2408
|
+
case 'get_district_teams_keys': {
|
|
2409
|
+
const { district_key } = z
|
|
2410
|
+
.object({ district_key: z.string() })
|
|
2411
|
+
.parse(args);
|
|
2412
|
+
const data = await makeApiRequest(`/district/${district_key}/teams/keys`);
|
|
2413
|
+
const keys = z.array(z.string()).parse(data);
|
|
2414
|
+
return {
|
|
2415
|
+
content: [
|
|
2416
|
+
{
|
|
2417
|
+
type: 'text',
|
|
2418
|
+
text: JSON.stringify(keys, null, 2),
|
|
2419
|
+
},
|
|
2420
|
+
],
|
|
2421
|
+
};
|
|
2422
|
+
}
|
|
2423
|
+
case 'get_match_zebra': {
|
|
2424
|
+
const { match_key } = z
|
|
2425
|
+
.object({ match_key: z.string() })
|
|
2426
|
+
.parse(args);
|
|
2427
|
+
const data = await makeApiRequest(`/match/${match_key}/zebra`);
|
|
2428
|
+
const zebra = ZebraSchema.parse(data);
|
|
2429
|
+
return {
|
|
2430
|
+
content: [
|
|
2431
|
+
{
|
|
2432
|
+
type: 'text',
|
|
2433
|
+
text: JSON.stringify(zebra, null, 2),
|
|
2434
|
+
},
|
|
2435
|
+
],
|
|
2436
|
+
};
|
|
2437
|
+
}
|
|
2438
|
+
case 'get_event_predictions': {
|
|
2439
|
+
const { event_key } = z
|
|
2440
|
+
.object({ event_key: EventKeySchema })
|
|
2441
|
+
.parse(args);
|
|
2442
|
+
const data = await makeApiRequest(`/event/${event_key}/predictions`);
|
|
2443
|
+
const predictions = PredictionSchema.parse(data);
|
|
2444
|
+
return {
|
|
2445
|
+
content: [
|
|
2446
|
+
{
|
|
2447
|
+
type: 'text',
|
|
2448
|
+
text: JSON.stringify(predictions, null, 2),
|
|
2449
|
+
},
|
|
2450
|
+
],
|
|
2451
|
+
};
|
|
2452
|
+
}
|
|
2453
|
+
default:
|
|
2454
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
2412
2455
|
}
|
|
2413
|
-
default:
|
|
2414
|
-
throw new Error(`Unknown tool: ${name}`);
|
|
2415
2456
|
}
|
|
2457
|
+
catch (error) {
|
|
2458
|
+
const errorMessage = `Tool execution error for '${name}': ${error instanceof Error ? error.message : String(error)}`;
|
|
2459
|
+
console.error(errorMessage, error);
|
|
2460
|
+
return {
|
|
2461
|
+
content: [
|
|
2462
|
+
{
|
|
2463
|
+
type: 'text',
|
|
2464
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
|
|
2465
|
+
},
|
|
2466
|
+
],
|
|
2467
|
+
isError: true,
|
|
2468
|
+
};
|
|
2469
|
+
}
|
|
2470
|
+
});
|
|
2471
|
+
console.error('Setting up transport connection ...');
|
|
2472
|
+
try {
|
|
2473
|
+
const transport = new StdioServerTransport();
|
|
2474
|
+
await server.connect(transport);
|
|
2475
|
+
console.error('The Blue Alliance MCP Server running on stdio');
|
|
2416
2476
|
}
|
|
2417
2477
|
catch (error) {
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
type: 'text',
|
|
2422
|
-
text: `Error: ${error instanceof Error ? error.message : String(error)}`,
|
|
2423
|
-
},
|
|
2424
|
-
],
|
|
2425
|
-
isError: true,
|
|
2426
|
-
};
|
|
2478
|
+
const errorMessage = 'Failed to connect to transport';
|
|
2479
|
+
console.error(errorMessage, error instanceof Error ? error.message : error);
|
|
2480
|
+
throw new Error(errorMessage);
|
|
2427
2481
|
}
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2482
|
+
// Set up error handlers for the server
|
|
2483
|
+
process.on('uncaughtException', (error) => {
|
|
2484
|
+
console.error('Uncaught exception in MCP server:', error);
|
|
2485
|
+
process.exit(1);
|
|
2486
|
+
});
|
|
2487
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
2488
|
+
console.error('Unhandled rejection in MCP server:', reason, 'at promise:', promise);
|
|
2489
|
+
process.exit(1);
|
|
2490
|
+
});
|
|
2491
|
+
}
|
|
2492
|
+
catch (error) {
|
|
2493
|
+
const errorMessage = 'Fatal error during server initialization';
|
|
2494
|
+
console.error(errorMessage, error instanceof Error ? error.message : error, error);
|
|
2495
|
+
throw error;
|
|
2496
|
+
}
|
|
2432
2497
|
}
|
|
2433
2498
|
// Only run the server if this file is executed directly
|
|
2434
2499
|
// Check if this is the main module by comparing file paths
|
|
2435
2500
|
const isMainModule = process.argv[1] && process.argv[1].endsWith('index.js');
|
|
2436
2501
|
if (isMainModule) {
|
|
2437
2502
|
runServer().catch((error) => {
|
|
2438
|
-
console.error('Fatal error running server:', error);
|
|
2503
|
+
console.error('Fatal error running server:', error instanceof Error ? error.message : error);
|
|
2504
|
+
console.error('Stack trace:', error instanceof Error ? error.stack : 'No stack trace available');
|
|
2505
|
+
console.error('Server will now exit');
|
|
2439
2506
|
process.exit(1);
|
|
2440
2507
|
});
|
|
2441
2508
|
}
|