Skip to main content
Glama

validate_moveset

Validate Pokémon movesets against PokeAPI by version group to ensure move compatibility and accuracy for battle preparation.

Instructions

Valida un moveset contra PokeAPI por version_group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
movesYes
nameYes
version_groupNoemerald

Implementation Reference

  • The handler function validates the provided moveset against the Pokemon's learnset from PokeAPI for the given version_group. It checks each move and reports issues if not in learnset.
    }, async (args:any) => { const name = String(args.name), vg = String(args.version_group || 'emerald'); const moves = (args.moves as string[]).map(String); const ls = await pokeapi.learnset(name, vg); const index = new Map(ls.map(e => [e.move.toLowerCase(), e.methods])); const details:any[] = []; const issues:any[] = []; for (const mv of moves) { const item = index.get(mv.toLowerCase()); if (!item) issues.push({ code:'illegal-move', move: mv, detail: 'not-in-learnset' }); else details.push({ move: mv, methods: item }); } return jsonContent({ ok: issues.length===0, issues, learned: details }); });
  • Input schema defining parameters: name (string), version_group (string, default 'emerald'), moves (array of strings, 1-4 items). Requires name and moves.
    type:'object', properties:{ name:{type:'string'}, version_group:{type:'string', default:'emerald'}, moves:{type:'array', items:{type:'string'}, minItems:1, maxItems:4} }, required:['name','moves']
  • src/index.ts:125-142 (registration)
    The registerTool call registers the 'validate_moveset' tool with its description, input schema, and inline handler function.
    registerTool('validate_moveset', 'Valida un moveset contra PokeAPI por version_group.', { type:'object', properties:{ name:{type:'string'}, version_group:{type:'string', default:'emerald'}, moves:{type:'array', items:{type:'string'}, minItems:1, maxItems:4} }, required:['name','moves'] }, async (args:any) => { const name = String(args.name), vg = String(args.version_group || 'emerald'); const moves = (args.moves as string[]).map(String); const ls = await pokeapi.learnset(name, vg); const index = new Map(ls.map(e => [e.move.toLowerCase(), e.methods])); const details:any[] = []; const issues:any[] = []; for (const mv of moves) { const item = index.get(mv.toLowerCase()); if (!item) issues.push({ code:'illegal-move', move: mv, detail: 'not-in-learnset' }); else details.push({ move: mv, methods: item }); } return jsonContent({ ok: issues.length===0, issues, learned: details }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EscasanN/MCP_Pokemon'

If you have feedback or need assistance with the MCP directory API, please join our Discord server