Skip to main content
Glama

Football Database and Results

Head-to-head record

head_to_head
Read-onlyIdempotent

[PAID] The complete record between two teams, and every match they have ever played.

Answers "who wins more between these two, and how often do they draw?" — matches played, wins each way, draws, goals each way and the draw percentage, all from team A's perspective, followed by every meeting with its date, competition and score. Optionally narrow to one competition type or a single edition to compare only their league games, or only one season.

Both teams are given as numeric ids, which list_teams returns.

Costs 1 point per call (1 point = 1 cent); paginated calls cost 1 point per page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesTeam A, as a numeric id from list_teams. The record is reported from this team's point of view.
bYesTeam B, as a numeric id from list_teams. Must differ from a.
itemNoRestrict to a single edition or season id, from list_tournaments with a `tournament` argument.
typeNoRestrict to one competition type, such as league or cup.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / data / properties / meetings / items / properties / ninety_score_unknown
      Added value: +{
      +  "description": "Played extra-time match known to be level at ninety minutes, with the exact ninety-minute score unavailable.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / data / properties / meetings / items / properties / score / description
      Previous value: -"Final score; both null until the match is played."New value: +"Ninety-minute score; both values null before play or when the exact score is unknown, including played extra-time draws."
    • addedOutput schema / properties / data / properties / meetings / items / properties / score_120
      Added value: +{
      +  "description": "Score after extra time; both values null when unavailable or no extra time was played.",
      +  "properties": {
      +    "away": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "home": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "properties": {
      +        "meetings": {
      +          "description": "Every match between them.",
      +          "items": {
      +            "description": "A match.",
      +            "properties": {
      +              "away_team": {
      +                "description": "A team reference.",
      +                "properties": {
      +                  "id": {
      +                    "description": "Team id — the argument every team tool takes.",
      +                    "type": "integer"
      +                  },
      +                  "name": {
      +                    "description": "Short display name.",
      +                    "type": "string"
      +                  },
      +                  "slug": {
      +                    "description": "URL slug; accepted anywhere an id is.",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "slug",
      +                  "name"
      +                ],
      +                "type": "object"
      +              },
      +              "competition": {
      +                "description": "The competition and edition the match belongs to.",
      +                "properties": {
      +                  "edition": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "edition_id": {
      +                    "description": "The season or edition id, from list_tournaments.",
      +                    "type": [
      +                      "integer",
      +                      "null"
      +                    ]
      +                  },
      +                  "id": {
      +                    "type": "integer"
      +                  },
      +                  "name": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "year": {
      +                    "type": [
      +                      "integer",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": [
      +                  "object",
      +                  "null"
      +                ]
      +              },
      +              "date": {
      +                "description": "Match date, YYYY-MM-DD.",
      +                "type": "string"
      +              },
      +              "home_team": {
      +                "description": "A team reference.",
      +                "properties": {
      +                  "id": {
      +                    "description": "Team id — the argument every team tool takes.",
      +                    "type": "integer"
      +                  },
      +                  "name": {
      +                    "description": "Short display name.",
      +                    "type": "string"
      +                  },
      +                  "slug": {
      +                    "description": "URL slug; accepted anywhere an id is.",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "slug",
      +                  "name"
      +                ],
      +                "type": "object"
      +              },
      +              "id": {
      +                "description": "Match id, as get_draw_model takes it.",
      +                "type": "integer"
      +              },
      +              "is_draw": {
      +                "description": "Whether the match ended level.",
      +                "type": "boolean"
      +              },
      +              "result": {
      +                "description": "H home win, A away win, D draw; empty until played.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "score": {
      +                "description": "Final score; both null until the match is played.",
      +                "properties": {
      +                  "away": {
      +                    "type": [
      +                      "integer",
      +                      "null"
      +                    ]
      +                  },
      +                  "home": {
      +                    "type": [
      +                      "integer",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "status": {
      +                "description": "PLAYED, SCHEDULED, POSTPONED and so on.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "date"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "record": {
      +          "description": "The overall record between the two.",
      +          "properties": {
      +            "draw_percent": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "draws": {
      +              "type": "integer"
      +            },
      +            "goals_team_a": {
      +              "type": "integer"
      +            },
      +            "goals_team_b": {
      +              "type": "integer"
      +            },
      +            "played": {
      +              "type": "integer"
      +            },
      +            "team_a_wins": {
      +              "type": "integer"
      +            },
      +            "team_b_wins": {
      +              "type": "integer"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "team_a": {
      +          "description": "A team.",
      +          "properties": {
      +            "country": {
      +              "description": "The country a team or competition belongs to.",
      +              "properties": {
      +                "fifa_code": {
      +                  "description": "Three-letter FIFA code.",
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "id": {
      +                  "type": "integer"
      +                },
      +                "name": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "id"
      +              ],
      +              "type": [
      +                "object",
      +                "null"
      +              ]
      +            },
      +            "exists_now": {
      +              "description": "False for a team that no longer exists.",
      +              "type": "boolean"
      +            },
      +            "full_name": {
      +              "description": "Official or long name, when known.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "id": {
      +              "description": "Team id — the argument every team tool takes.",
      +              "type": "integer"
      +            },
      +            "name": {
      +              "description": "Short display name.",
      +              "type": "string"
      +            },
      +            "slug": {
      +              "description": "URL slug; accepted anywhere an id is.",
      +              "type": "string"
      +            },
      +            "type": {
      +              "description": "\"national_team\" or \"club\".",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "slug",
      +            "name"
      +          ],
      +          "type": "object"
      +        },
      +        "team_b": {
      +          "description": "A team.",
      +          "properties": {
      +            "country": {
      +              "description": "The country a team or competition belongs to.",
      +              "properties": {
      +                "fifa_code": {
      +                  "description": "Three-letter FIFA code.",
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "id": {
      +                  "type": "integer"
      +                },
      +                "name": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "id"
      +              ],
      +              "type": [
      +                "object",
      +                "null"
      +              ]
      +            },
      +            "exists_now": {
      +              "description": "False for a team that no longer exists.",
      +              "type": "boolean"
      +            },
      +            "full_name": {
      +              "description": "Official or long name, when known.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "id": {
      +              "description": "Team id — the argument every team tool takes.",
      +              "type": "integer"
      +            },
      +            "name": {
      +              "description": "Short display name.",
      +              "type": "string"
      +            },
      +            "slug": {
      +              "description": "URL slug; accepted anywhere an id is.",
      +              "type": "string"
      +            },
      +            "type": {
      +              "description": "\"national_team\" or \"club\".",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "slug",
      +            "name"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "data"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations already covering read-only and idempotent behavior, the description adds important operational context: paid access at 1 point per call, paginated calls costing 1 point per page, and that results are reported from team A's perspective. It also describes the returned aggregate stats and match list, which is valuable behavioral detail beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The cost notice and core purpose are front-loaded, and the description moves logically into outputs and optional filters. It is slightly verbose and repeats some schema details, but the length is reasonable for a paid, multi-filter historical analysis tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The definition covers pricing, pagination cost, required team IDs and their source, optional filters, result perspective, and expected output content. Given the output schema and annotations already handle return structure and safety, this is complete enough for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already fully documents all four parameters, including team A perspective and id validation. The description mostly repeats that information and does not add significant parameter semantics beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific resource and scope: the complete historical record between two teams, including every match ever played. It is clearly distinct from sibling tools like get_team, get_team_streaks, and search_results by focusing on head-to-head meetings and aggregate outcomes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for optional narrowing: use item or type to compare only league games, a single edition, or a single season. It does not explicitly state when not to use this tool or name alternative sibling tools for similar needs, so it falls just short of full when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources