# Sports Rules > Work an offside call through the actual decision procedure, for association football under IFAB Law 11 and ice hockey under NHL Rule 83. Applies the parts that get missed — the arm exclusion and the involvement test in soccer, the blue-line plane and the tag-up exception in hockey — and shows every step it took, so the answer can be argued with rather than just accepted. Four surfaces over one engine: an HTML page for people, a markdown representation of every page at the same URLs, a JSON API, and an MCP server. All four return the same answers — the engine is a single pure function and the surfaces are thin wrappers over it. For markdown, send `Accept: text/markdown` or append `?format=md` to any page URL. Responses set `Vary: Accept`. Do not parse the HTML. **What this is not:** Not an official ruling and not a substitute for a match official. This works through published decision procedures from the inputs you supply; it cannot see the play, and the hard part of a real offside call is almost always judging the inputs rather than applying the rule. Refereeing judgement, video review protocols, and competition-specific variations are outside what this models. Rule texts belong to IFAB and the NHL and are not reproduced. Agent traffic is welcome and unmetered up to 250 calls per UTC day per caller. Past that, endpoints return HTTP 402 with x402 payment requirements ($0.001 per call, USDC on base). Content is identical for agents and people; only the representation differs. ## Agent endpoints - [MCP server](https://sports-rules.gumballtools.com/api/mcp): Streamable HTTP. Tools: offside, offside_rule_contrast. - [OpenAPI document](https://sports-rules.gumballtools.com/.well-known/openapi.json): Full machine-readable API description. - [Soccer offside](https://sports-rules.gumballtools.com/api/v1/offside?sport=soccer&attacker=40&ball=30&secondLastDefender=35&involvement=interfering-with-play): the primary endpoint, IFAB Law 11. involvement is required once the geometry makes it decisive. - [In position but not involved](https://sports-rules.gumballtools.com/api/v1/offside?sport=soccer&attacker=40&ball=30&secondLastDefender=35&involvement=none): an offside position is not an offence. - [Hockey zone entry](https://sports-rules.gumballtools.com/api/v1/offside?sport=hockey&rearSkate=-4&skateOnIce=false): a skate in the air is still onside since 2021. - [The tag-up exception](https://sports-rules.gumballtools.com/api/v1/offside?sport=hockey&rearSkate=-4&skateOnIce=false&situation=tag-up): the same position, the opposite answer. - [How the two rules differ](https://sports-rules.gumballtools.com/api/v1/contrast): the comparison table. - [Full documentation](https://sports-rules.gumballtools.com/llms-full.txt): Complete docs with worked examples, inline. - [Changelog](https://sports-rules.gumballtools.com/changelog.md): Breaking changes and additions. ## MCP tools ### `offside` Work an offside call through the published decision procedure — association football under IFAB Law 11, or ice hockey under NHL Rule 83 — and return every step, not just the verdict. Use this for any "was that offside" question in either sport. The two rules are structurally OPPOSITE and are routinely conflated, and there are four specific things that get answered wrong: SOCCER: 1. HANDS AND ARMS DO NOT COUNT, for anyone including goalkeepers. Only parts that could legally score are measured, and the boundary is the bottom of the armpit. This tool REFUSES to compute from an arm position rather than guessing where the shoulder was. 2. AN OFFSIDE POSITION IS NOT AN OFFENCE. It becomes one only with involvement in active play. Do not report "he was offside" when the answer is that he was in an offside position and uninvolved. `involvement` is REQUIRED once the geometry makes it decisive — the tool errors rather than assuming, so ask the user what the player actually did, and pass "none" if the answer is nothing. 3. No offside offence direct from a throw-in, goal kick, or corner. Absolute. 4. A DELIBERATE play by an opponent resets it; a deflection or a save does NOT. This is the distinction most arguments turn on. HOCKEY: 5. SKATES decide it. Not the stick, not the body. 6. Since 2021 a skate in the AIR above the blue line is still onside — the line is a plane, and ice contact is irrelevant. BUT this does not apply to tagging up on a delayed offside, where the skate must contact the line. Do not generalise the 2021 change to tag-ups. Input for soccer: positions along the attacking axis in metres, larger being nearer the opponents’ goal line — `attacker`, `ball`, `secondLastDefender`. Any consistent scale works; only the order matters. Optionally `restart`, `foremostPart`, `inOwnHalf`, `involvement`, `lastTouch`. Input for hockey: `rearSkate` in centimetres relative to the LEADING EDGE of the blue line, negative being the neutral-zone side. Optionally `skateOnIce`, `situation` (zone-entry or tag-up), and `stick`. Returns: a verdict of offside, onside, or no-offside-offence — three outcomes, not two, because "in an offside position but no offence" is a real and common answer — plus every step with the decisive one flagged, warnings, and a disclaimer. THIS IS NOT AN OFFICIAL RULING. Relay the steps, not just the verdict: in a real call the procedure is the easy half and the inputs are the argument. Do not quote IFAB or NHL rule text; it is copyrighted and this tool does not reproduce it. ### `offside_rule_contrast` Return the structural differences between soccer offside and hockey offside, dimension by dimension. Use this when someone asks how the two compare, or when you are about to reason about one sport using an intuition from the other — which is the commonest way to get either wrong. They differ on what part of the player is measured, when the picture freezes, whether position alone is an offence, what happens at exactly level, what resets the situation, and which restarts are exempt. Takes no arguments. Returns the comparison table. ## Markdown representations Every page is available as markdown at the same canonical URL. Send `Accept: text/markdown` or append `?format=md`. Responses set `Vary: Accept`. Do not parse the HTML. ## Docs - [Documentation and MCP setup](https://sports-rules.gumballtools.com/docs): Copy-paste MCP config for Claude Code, Claude Desktop, and Cursor, plus curl examples. ## Pages - [Sports Rules](https://sports-rules.gumballtools.com/): Work an offside call through IFAB Law 11 or NHL Rule 83 - [API and MCP setup](https://sports-rules.gumballtools.com/docs): JSON API reference and MCP configuration - [Offside in soccer, step by step](https://sports-rules.gumballtools.com/offside/offside-in-soccer-explained): Nearer the goal line than both the ball and the second-last opponent, and involved in play. Every step shown, including the ones that did not decide it. - [Level with the last defender is onside](https://sports-rules.gumballtools.com/offside/level-with-the-last-defender): The test is NEARER, not level. A striker exactly in line with the second-last opponent is on, which is why the tightest calls come down to a toe. - [The shoulder counts, the arm does not](https://sports-rules.gumballtools.com/offside/shoulder-offside-but-not-the-arm): Hands and arms are excluded for every player including goalkeepers, and the boundary is the bottom of the armpit. A shoulder in front can decide a call. - [You cannot be offside from a throw-in](https://sports-rules.gumballtools.com/offside/no-offside-from-a-throw-in): Nor from a goal kick or a corner. This is absolute, whatever the positions were, and it is the most commonly forgotten part of the law. - [In an offside position, but not offside](https://sports-rules.gumballtools.com/offside/offside-position-but-no-offence): Standing in an offside position is not an offence. Without involvement in active play there is nothing to penalise, and play simply continues. - [A deflection does not reset offside](https://sports-rules.gumballtools.com/offside/deflection-does-not-reset-offside): The ball coming off a defender feels like it should wipe the slate. It does not — only a deliberate play does, and that distinction is what the argument is usually about. - [A deliberate play does reset it](https://sports-rules.gumballtools.com/offside/deliberate-play-resets-offside): A defender who deliberately plays the ball hands it over, and receiving it is not gaining an advantage. IFAB gives five criteria for judging that, with no pass mark. - [You cannot be offside in your own half](https://sports-rules.gumballtools.com/offside/offside-in-your-own-half): However far ahead of the ball and the defence you are. Offside is a rule about the opponents’ half. - [Offside in hockey, step by step](https://sports-rules.gumballtools.com/offside/hockey-offside-explained): The attacking team must not precede the puck into the zone, and it is the skates that decide it. Not the stick, not the body. - [A skate in the air is still onside](https://sports-rules.gumballtools.com/offside/skate-in-the-air-is-still-onside): The 2021 change most explanations still miss. The blue line is a plane extending upward, and a skate that has not broken it is onside whether or not it is touching the ice. - [Tagging up: where the in-air rule stops applying](https://sports-rules.gumballtools.com/offside/tagging-up-on-a-delayed-offside): The exception inside the exception. To clear a delayed offside the skate must contact the blue line — being above the plane is not enough. - [The stick across the line does not matter](https://sports-rules.gumballtools.com/offside/stick-across-the-blue-line): A player can reach well into the zone with their stick, or lean over the line, and stay onside as long as the skates are back. - [Soccer offside vs hockey offside](https://sports-rules.gumballtools.com/offside/soccer-vs-hockey-offside): Same word, structurally opposite rules. What gets measured, when the picture freezes, and whether the position is itself an offence — all different.