Skip to main content
Glama

get_pokemon_images

Retrieve Pokémon sprite images including front/back views, shiny variants, and official artwork for any Pokémon by name or ID number.

Instructions

ポケモンのスプライト画像(前面、後面、色違い、公式アートワーク)を取得

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pokemonYesポケモン名またはID番号

Implementation Reference

  • Core handler function that fetches Pokemon data via PokeAPI, extracts sprite URLs (front_default, front_shiny, back_default, back_shiny, official_artwork), formats as JSON, and returns in MCP content format. Handles errors gracefully.
    private async getPokemonImages(pokemon: string) {
      try {
        const data = await this.fetchPokemonData(pokemon);
    
        // 画像情報を整理
        const images = {
          name: data.name,
          id: data.id,
          sprites: {
            front_default: data.sprites.front_default,     // 通常の前面画像
            front_shiny: data.sprites.front_shiny,         // 色違いの前面画像
            back_default: data.sprites.back_default,       // 通常の後面画像
            back_shiny: data.sprites.back_shiny,           // 色違いの後面画像
            official_artwork: data.sprites.other["official-artwork"].front_default  // 公式アートワーク
          }
        };
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(images, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `エラー: ${error instanceof Error ? error.message : String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • src/index.ts:97-110 (registration)
    Tool registration in ListTools handler: defines name, Japanese description, and input schema requiring 'pokemon' as string.
    {
      name: "get_pokemon_images",
      description: "ポケモンのスプライト画像(前面、後面、色違い、公式アートワーク)を取得",
      inputSchema: {
        type: "object",
        properties: {
          pokemon: {
            type: "string",
            description: "ポケモン名またはID番号",
          },
        },
        required: ["pokemon"],
      },
    },
  • Shared helper function to fetch raw Pokemon data from PokeAPI endpoint, used by getPokemonImages and other tools. Handles 404 and other errors.
    private async fetchPokemonData(pokemon: string): Promise<PokemonData> {
      try {
        const response = await axios.get(`https://pokeapi.co/api/v2/pokemon/${pokemon.toLowerCase()}`);
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error) && error.response?.status === 404) {
          throw new Error(`ポケモン "${pokemon}" が見つかりません`);
        }
        throw new Error(`ポケモンデータの取得に失敗しました: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • TypeScript interface defining PokemonData structure from PokeAPI, including sprites field crucial for image extraction in getPokemonImages.
    interface PokemonData {
      id: number;                    // ポケモンID
      name: string;                  // ポケモン名
      height: number;                // 身長
      weight: number;                // 体重
      base_experience: number;       // 基礎経験値
      stats: Array<{                 // ステータス配列
        base_stat: number;           // 基礎ステータス値
        stat: {
          name: string;              // ステータス名
        };
      }>;
      sprites: {                     // スプライト画像URL
        front_default: string | null;    // 通常の前面画像
        front_shiny: string | null;      // 色違いの前面画像
        back_default: string | null;     // 通常の後面画像
        back_shiny: string | null;       // 色違いの後面画像
        other: {
          "official-artwork": {
            front_default: string | null;  // 公式アートワーク
          };
        };
      };
      types: Array<{                 // タイプ配列
        type: {
          name: string;              // タイプ名
        };
      }>;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what is fetched (sprite images) but doesn't describe important behaviors: whether this is a read-only operation, what format/images are returned (e.g., URLs, base64 data), if there are rate limits, authentication requirements, or error conditions. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 extremely concise and front-loaded in a single Japanese sentence that efficiently conveys the core purpose. Every word earns its place by specifying the resource type, image categories, and action. There's zero wasted text or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, no nested objects) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, the description should ideally provide more context about return values (e.g., what format the images are in) and behavioral traits. It meets the bare minimum but doesn't fully compensate for the lack of structured data.

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

Parameters3/5

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

The schema description coverage is 100%, with the single parameter 'pokemon' fully documented in the schema as accepting Pokémon names or ID numbers. The description adds no additional parameter semantics beyond what's already in the schema. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though the description doesn't compensate or add value here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('取得' - get/fetch) and the specific resource ('ポケモンのスプライト画像' - Pokémon sprite images), including the types of images available (front, back, shiny variants, official artwork). It distinguishes from sibling tools by focusing on images rather than cries, info, stats, or audio playback. However, it doesn't explicitly contrast with the most similar sibling (get_pokemon_info might also return images).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate (e.g., for visual display needs) or when to use siblings like get_pokemon_info (which might include images along with other data) or get_pokemon_cry (for audio). There's no explicit 'when-not' or alternative recommendations.

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

Install Server

Other Tools

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/t-daiki96/poke_mcp'

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