Skip to main content
Glama

SportStatsAPI

Get head-to-head

get_h2h
Read-only

Head-to-head of two teams (soccer by default; any team sport with results: basketball, baseball, hockey, handball, volleyball, American football) over every meeting in our data (all competitions, no friendlies): won, drawn and lost from team_a's side (home_team_* fields = team_a), goals (the sport's score: points, runs, sets won), each side's biggest win, the last 5 meetings, with sentences (lang de, es, it, fr). history_from: our data starts there, so say 'since' that date. Tennis: get_player with vs. Facts only. Part of the Insights feature.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "team_a": "<team_a>",
      "team_b": "<team_b>"
    },
    "name": "get_h2h"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNolanguage of team, league and country names: de, es, it or fr (default English)
sportNoteam sport (default soccer; see list_sports; tennis: get_player with vs)
team_aYesteam code (or number) from find_teams or a match
team_bYesthe other team's id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / team_a / description
      Previous value: -"team id from find_teams or a match"New value: +"team code (or number) from find_teams or a match"
  2. Changed2 schema fields changed
    • changedInput schema / properties / team_a / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "string"
      +]
    • changedInput schema / properties / team_b / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "string"
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / sport
      Added value: +{
      +  "description": "team sport (default soccer; see list_sports; tennis: get_player with vs)",
      +  "type": "string"
      +}
  4. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds real value with the data-coverage caveat (history_from is where the data starts, so phrase as 'since' that date) and the exclusion of friendlies. It does not mention result volume or pagination limits, so it falls short of fully disclosing behavior.

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

Conciseness3/5

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

The purpose is front-loaded, but the entire definition is a single dense run-on sentence stitched with semicolons and parentheticals, which makes it harder to scan than necessary. The information earns its place, but the structure does not.

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?

With no output schema, the description carries the return-value burden and does so thoroughly: it enumerates the win/draw/loss breakdown, goals, biggest win, last 5 meetings, and the optional sentences with language options. Combined with the data-start caveat and sport coverage notes, nothing essential is missing for a 4-parameter read tool.

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

Parameters4/5

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

Schema coverage is 100%, so baseline would be 3, but the description adds meaning beyond the schema by fixing the orientation convention ('home_team_* fields = team_a') and clarifying that goals means the sport's score (points, runs, sets won). The lang and sport parameters are largely restated from the schema.

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 names the specific resource and verb ('Head-to-head of two teams'), the default sport, the supported sport list, and the exact output facets (won/drawn/lost from team_a's side, goals, biggest win, last 5 meetings). It also routes tennis to get_player with vs, so an agent can distinguish it from siblings without opening a schema.

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 usage context (any team sport with results, all competitions, no friendlies) and an explicit alternative for tennis via get_player with vs. It stops short of stating when NOT to use it in other cases (e.g. single-match lookups vs get_match), so it is clear but not exhaustive.

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