# Tournament Group Qualifier AI Agent Connect

> Calculate football tournament standings and qualification results.

## Overview
- **Category:** mathematics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_do7poPB000R6RZ4PQ2RDVQTKxsV98AsbMuRorsIu/ai-agent-connect
- **Tags:** football, tournament, standings, qualification, sports-data

## Description

This MCP server provides tools to process football tournament group stages. It calculates ranked standings using configurable tiebreakers, determines which teams qualify directly, which enter playoffs, and which are eliminated. It also handles best-third-place comparisons across groups. Use `get_group_standings` to build rankings, `calculate_qualifiers` to find advancing teams, `get_best_third_place_comparison` for third-place analysis, and `validate_tournament_structure` to ensure data integrity.

## Tools

### calculate_qualifiers
Determines which teams advance, enter playoffs, or are eliminated

### get_best_third_place_comparison
Provides a detailed breakdown of the third-placed teams across all groups

### get_group_standings
Calculates the ranked standings for all groups based on match results

### validate_tournament_structure
Ensures the provided match data and group configurations are logically sound

## Prompt Examples

**Prompt:** 
```
Calculate the standings for these matches: [{'teamA': 'Brazil', 'teamB': 'Germany', 'scoreA': 2, 'scoreB': 1}, {'teamA': 'Brazil', 'teamB': 'Italy', 'scoreA': 1, 'scoreB': 1}] using points and goal difference as tiebreakers.
```

**Response:** 
```
Brazil: 4 points, +2 GD. Italy: 1 point, 0 GD. Germany: 0 points, -2 GD.
```

**Prompt:** 
```
Which teams qualify if there are 1 direct slot and 1 playoff slot from these standings: [{'groupName': 'Group A', 'teams': [{'teamName': 'Team A', 'points': 9}, {'teamName': 'Team B', 'points': 4}, {'teamName': 'Team C', 'points': 1}]}]?
```

**Response:** 
```
Team A qualifies directly, and Team B enters the playoffs.
```

**Prompt:** 
```
Compare the third-place teams from these groups: [{'groupName': 'A', 'teams': [{'teamName': 'T1', 'points': 3}, {'teamName': 'T2', 'points': 3}, {'teamName': 'T3', 'points': 3}]}]
```

**Response:** 
```
The third-place team from Group A is T3 with 3 points.
```

## Frequently Asked Questions

**How are standings calculated?**
Standings are calculated based on points (3 for win, 1 for draw) and a custom priority of tiebreakers like goal difference or goals scored provided via `get_group_standings`.

**Can I compare third-place teams across different groups?**
Yes, you can use `get_best_third_place_comparison` to extract and compare the third-placed teams from all groups.

**How do I know if my tournament data is valid?**
You can use the `validate_tournament_structure` tool to check for logical inconsistencies in your match results and group configurations.
