Skip to main content
Glama

suggest_moveset

Generate optimal Pokémon movesets with STAB and coverage moves based on specified battle roles like sweeper, bulky, or support for competitive team building.

Instructions

Sugiere moveset (STAB + cobertura) usando tipos de cada movimiento.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
roleNosweeper
version_groupNoemerald

Implementation Reference

  • Main handler function for the 'suggest_moveset' tool. Fetches Pokémon core data and learnset, identifies STAB moves, prioritizes coverage and utility moves based on role (sweeper, bulky, support), selects a moveset, and provides details including move types, damage classes, and learning methods.
    }, async (args:any) => { const name = String(args.name), vg = String(args.version_group || 'emerald'), role = String(args.role || 'sweeper'); const core = await pokeapi.pokemonCore(name); const ls = await pokeapi.learnset(name, vg); const have = (m:string)=> ls.some(e => e.move.toLowerCase()===m.toLowerCase()); const moves = ls.map(e => e.move); // get move types lazily const typeOf = async (m:string) => (await pokeapi.getMove(m)).type.name as string; const damageClassOf = async (m:string) => (await pokeapi.getMove(m)).damage_class.name as string; // Build STAB and coverage pools const stab = []; for (const m of moves) { try { const t = await typeOf(m); if (core.types.includes(t)) stab.push(m); } catch {} } // Common strong coverage list to prioritize if present in learnset const coveragePreferred = ['earthquake','rock-slide','ice-beam','thunderbolt','flamethrower','psychic','shadow-ball','brick-break','aerial-ace','giga-drain','crunch','ice-punch','fire-punch','thunder-punch','dragon-claw','overheat','hydro-pump','surf']; const coverage = []; for (const m of moves) { const nn = m.toLowerCase(); if (coveragePreferred.includes(nn)) coverage.push(m); } const utilityPreferred = ['swords-dance','dragon-dance','will-o-wisp','thunder-wave','substitute','protect','rapid-spin','spikes','sandstorm']; const utility = []; for (const m of moves) { const nn = m.toLowerCase(); if (utilityPreferred.includes(nn)) utility.push(m); } const pick = (arr:string[], n:number) => Array.from(new Set(arr)).slice(0, n); let chosen:string[] = []; if (role === 'sweeper') chosen = [...pick(stab,2), ...pick(coverage,2)]; else if (role === 'bulky') chosen = [...pick(stab,1), ...pick(utility,2), ...pick(coverage,1)]; else chosen = [...pick(utility,2), ...pick(stab,1), ...pick(coverage,1)]; // Attach minimal legality/method info const index = new Map(ls.map(e => [e.move.toLowerCase(), e.methods])); const legality = await Promise.all(chosen.map(async m => ({ move: m, type: await typeOf(m), damage_class: await damageClassOf(m), methods: index.get(m.toLowerCase()) || [] }))); return jsonContent({ name: core.name, role, version_group: vg, moveset: chosen, details: legality }); });
  • Input schema defining parameters for the suggest_moveset tool: Pokémon name (required), optional version_group and role (sweeper, bulky, support).
    type:'object', properties:{ name:{type:'string'}, version_group:{type:'string', default:'emerald'}, role:{type:'string', enum:['sweeper','bulky','support'], default:'sweeper'} }, required:['name']
  • src/index.ts:144-195 (registration)
    Registration of the 'suggest_moveset' tool in the registry, including name, description, input schema, and inline handler function.
    registerTool('suggest_moveset', 'Sugiere moveset (STAB + cobertura) usando tipos de cada movimiento.', { type:'object', properties:{ name:{type:'string'}, version_group:{type:'string', default:'emerald'}, role:{type:'string', enum:['sweeper','bulky','support'], default:'sweeper'} }, required:['name'] }, async (args:any) => { const name = String(args.name), vg = String(args.version_group || 'emerald'), role = String(args.role || 'sweeper'); const core = await pokeapi.pokemonCore(name); const ls = await pokeapi.learnset(name, vg); const have = (m:string)=> ls.some(e => e.move.toLowerCase()===m.toLowerCase()); const moves = ls.map(e => e.move); // get move types lazily const typeOf = async (m:string) => (await pokeapi.getMove(m)).type.name as string; const damageClassOf = async (m:string) => (await pokeapi.getMove(m)).damage_class.name as string; // Build STAB and coverage pools const stab = []; for (const m of moves) { try { const t = await typeOf(m); if (core.types.includes(t)) stab.push(m); } catch {} } // Common strong coverage list to prioritize if present in learnset const coveragePreferred = ['earthquake','rock-slide','ice-beam','thunderbolt','flamethrower','psychic','shadow-ball','brick-break','aerial-ace','giga-drain','crunch','ice-punch','fire-punch','thunder-punch','dragon-claw','overheat','hydro-pump','surf']; const coverage = []; for (const m of moves) { const nn = m.toLowerCase(); if (coveragePreferred.includes(nn)) coverage.push(m); } const utilityPreferred = ['swords-dance','dragon-dance','will-o-wisp','thunder-wave','substitute','protect','rapid-spin','spikes','sandstorm']; const utility = []; for (const m of moves) { const nn = m.toLowerCase(); if (utilityPreferred.includes(nn)) utility.push(m); } const pick = (arr:string[], n:number) => Array.from(new Set(arr)).slice(0, n); let chosen:string[] = []; if (role === 'sweeper') chosen = [...pick(stab,2), ...pick(coverage,2)]; else if (role === 'bulky') chosen = [...pick(stab,1), ...pick(utility,2), ...pick(coverage,1)]; else chosen = [...pick(utility,2), ...pick(stab,1), ...pick(coverage,1)]; // Attach minimal legality/method info const index = new Map(ls.map(e => [e.move.toLowerCase(), e.methods])); const legality = await Promise.all(chosen.map(async m => ({ move: m, type: await typeOf(m), damage_class: await damageClassOf(m), methods: index.get(m.toLowerCase()) || [] }))); return jsonContent({ name: core.name, role, version_group: vg, moveset: chosen, details: legality }); });

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