Skip to main content
Glama

Check team legality

check_legality
Read-onlyIdempotent

Validate a 6-member Pokémon team against a VGC regulation set, flagging illegal species, duplicate items or Pokédex numbers, unlearnable moves, and Mega Evolution issues.

Instructions

Validate up to 6 team members against a Pokémon Champions / VGC Regulation Set, reporting illegal or unknown species, duplicate National Pokédex numbers (Species Clause), duplicate items (Item Clause), unlearnable moves, team size (must be exactly 6), and who may Mega Evolve (one per battle). Species resolve case-insensitively to base species (any form of a legal base qualifies). A move is legal when any species in the evolution line knows it — the form, its base species, or a pre-evolution — because egg and level-up moves carry up on evolution: Rillaboom may hold Fake Out, which is Grookey’s egg move. get_learnset lists one species’ own learnset rather than this union, get_regulation gives the roster, and for stat values rather than legality use calculate_stats. Unknown ids return an isError listing them. Read-only and offline; returns valid, violations, and per-member checks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamYesTeam members, 1-6 of them; a VGC Battle Team must be exactly 6, so any other length adds a team-size violation.
regulationYesRegulation Set id or name, matched case- and punctuation-insensitively: "M-A", "m-a", "mc", and "Regulation Set M-C" all resolve to the same set.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
megaYesMega Evolution summary for the checked team.
validYesTrue only when `violations` is empty; false when any member is illegal or unknown, a clause is broken, or the team is not exactly 6.
statusYesThat set’s status relative to today.
membersYesOne entry per supplied team member, in the order supplied.
teamSizeYesHow many members were supplied (1-6).
regulationYesDisplay name of the set the team was checked against, e.g. "Regulation Set M-C".
violationsYesEvery violation found, as human-readable text (illegal/unknown species, Species Clause, unknown item, Item Clause, illegal/unknown moves, team size); empty when the team is legal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.1.1
    • addedInput schema / properties / regulation / description
      Added value: +"Regulation Set id or name, matched case- and punctuation-insensitively: \"M-A\", \"m-a\", \"mc\", and \"Regulation Set M-C\" all resolve to the same set."
    • addedInput schema / properties / team / description
      Added value: +"Team members, 1-6 of them; a VGC Battle Team must be exactly 6, so any other length adds a team-size violation."
    • addedInput schema / properties / team / items / properties / item / description
      Added value: +"Held item; a duplicate across the team is an Item Clause violation and an unknown item is reported as a violation."
    • addedInput schema / properties / team / items / properties / moves
      Added value: +{
      +  "description": "Moves to verify against the form and base-species learnsets; each is reported with legal true/false and, when illegal, a reason.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / team / items / properties / species / description
      Added value: +"Species name in any form; resolved case-insensitively and matched to the set roster by base species, so alternate forms of an eligible species pass."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "mega": {
      +      "additionalProperties": false,
      +      "description": "Mega Evolution summary for the checked team.",
      +      "properties": {
      +        "capable": {
      +          "description": "Species on this team that may Mega Evolve; empty when none can.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "note": {
      +          "description": "Reminder that a player may Mega Evolve only once per battle.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "capable",
      +        "note"
      +      ],
      +      "type": "object"
      +    },
      +    "members": {
      +      "description": "One entry per supplied team member, in the order supplied.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "baseSpecies": {
      +            "description": "The base species the roster and Species Clause checks used (eligibility is by National Pokédex number); absent when the species is unknown.",
      +            "type": "string"
      +          },
      +          "item": {
      +            "description": "Held item exactly as supplied; absent when the member had none.",
      +            "type": "string"
      +          },
      +          "itemValid": {
      +            "description": "Whether the supplied item is a known item; absent when the member had no item.",
      +            "type": "boolean"
      +          },
      +          "legal": {
      +            "description": "True when the species exists and its base species is on this set’s roster.",
      +            "type": "boolean"
      +          },
      +          "megaCapable": {
      +            "description": "True when this member’s base species may Mega Evolve in this set (false for unknown species).",
      +            "type": "boolean"
      +          },
      +          "moves": {
      +            "description": "One entry per supplied move, in order; present only when the member listed moves and its species was known.",
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "legal": {
      +                  "description": "True when the move is in either the form’s or the base species’ learnset.",
      +                  "type": "boolean"
      +                },
      +                "move": {
      +                  "description": "Resolved move name, or the name as supplied when the move is unknown.",
      +                  "type": "string"
      +                },
      +                "note": {
      +                  "description": "Why the move failed (\"unknown move\" or \"not in learnset\"); absent for legal moves.",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "move",
      +                "legal"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "species": {
      +            "description": "Resolved species name, or the name as supplied when the species is unknown.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "species",
      +          "legal",
      +          "megaCapable"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "regulation": {
      +      "description": "Display name of the set the team was checked against, e.g. \"Regulation Set M-C\".",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "That set’s status relative to today.",
      +      "enum": [
      +        "past",
      +        "current",
      +        "upcoming"
      +      ],
      +      "type": "string"
      +    },
      +    "teamSize": {
      +      "description": "How many members were supplied (1-6).",
      +      "type": "number"
      +    },
      +    "valid": {
      +      "description": "True only when `violations` is empty; false when any member is illegal or unknown, a clause is broken, or the team is not exactly 6.",
      +      "type": "boolean"
      +    },
      +    "violations": {
      +      "description": "Every violation found, as human-readable text (illegal/unknown species, Species Clause, unknown item, Item Clause, illegal/unknown moves, team size); empty when the team is legal.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "regulation",
      +    "status",
      +    "teamSize",
      +    "valid",
      +    "violations",
      +    "members",
      +    "mega"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark readOnlyHint, idempotentHint, destructiveHint, and openWorldHint. The description adds significant behavioral context beyond these: case-insensitive species resolution, the evolution-line move legality rule (egg/level-up carry), team-size exactness, and the return structure ('returns valid, violations, and per-member checks'). It also discloses that unknown ids produce an isError listing. No contradictions.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core purpose, then details, then alternatives. Each sentence contributes new information—no filler or redundancy. Despite its length, it remains efficient given the tool's complexity, and it flows logically from what → how → when-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?

For a tool with 2 required parameters, full schema coverage, an output schema, and rich annotations, the description is complete. It explains all validation rules, edge cases (unknown ids, case-insensitivity), and the return shape. An agent would have everything needed to call it correctly without additional lookups.

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

Parameters5/5

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

Schema coverage is 100%, so baseline is 3, but the description adds substantial meaning to the parameters: it explains that species are resolved case-insensitively to base species (forms qualify), that moves are checked against the union of form/base/pre-evolution learnsets, and that team size must be exactly 6. It also clarifies how the regulation id is matched (case- and punctuation-insensitive). This goes well beyond the raw schema descriptions.

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 opens with a precise verb–resource pair: 'Validate up to 6 team members against a Pokémon Champions / VGC Regulation Set' and enumerates the specific checks performed (species, duplicates, moves, team size, Mega Evolution). It clearly distinguishes this from siblings like get_learnset, get_regulation, and calculate_stats by stating what each alternative does instead.

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

Usage Guidelines5/5

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

Explicitly names alternatives and the conditions that select them: 'get_learnset lists one species’ own learnset rather than this union, get_regulation gives the roster, and for stat values rather than legality use calculate_stats.' It also states the read-only/offline nature, leaving no ambiguity about when to call this tool versus others.

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