Skip to main content
Glama
hollanddd

Pokédex MCP Server

by hollanddd

fetch_pokemon

Retrieve detailed Pokémon data including stats, abilities, sprites, and battle mechanics by providing a name or ID. This tool accesses comprehensive information from the Pokédex MCP Server for AI agents.

Instructions

Fetch detailed information about a Pokémon by name or ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name or ID of the Pokémon

Implementation Reference

  • The async handler function for the 'fetch_pokemon' tool. It takes the 'name' parameter, fetches the Pokémon data using pokeAPI.getPokemon, formats it with formatPokemon, and handles errors with formatCaughtError.
    async ({ name }) => {
      try {
        const pokemon = await pokeAPI.getPokemon(name.toLowerCase().trim());
        return formatPokemon(pokemon);
      } catch (error) {
        return formatCaughtError(error, "fetching Pokémon");
      }
    },
  • The Zod input schema defining the 'name' parameter for the 'fetch_pokemon' tool.
    {
      name: z.string().min(1).describe("The name or ID of the Pokémon"),
    },
  • src/tools.ts:15-29 (registration)
    The MCP server.tool registration for 'fetch_pokemon', including name, description, schema, and inline handler.
    server.tool(
      "fetch_pokemon",
      "Fetch detailed information about a Pokémon by name or ID",
      {
        name: z.string().min(1).describe("The name or ID of the Pokémon"),
      },
      async ({ name }) => {
        try {
          const pokemon = await pokeAPI.getPokemon(name.toLowerCase().trim());
          return formatPokemon(pokemon);
        } catch (error) {
          return formatCaughtError(error, "fetching Pokémon");
        }
      },
    );
  • Helper function to format the fetched Pokémon data into a formatted MCP text response.
    export function formatPokemon(pokemon: Pokemon): MCPResponse {
      const stats = pokemon.stats
        .map((s) => `${s.stat.name}: ${s.base_stat}`)
        .join(", ");
      
      const types = pokemon.types.map((t) => t.type.name).join(", ");
      
      const abilities = pokemon.abilities
        .map((a) =>
          a.is_hidden ? `${a.ability.name} (hidden)` : a.ability.name,
        )
        .join(", ");
    
      const artworkUrl = pokemon.sprites.other?.["official-artwork"]?.front_default;
    
      return {
        content: [
          {
            type: "text",
            text: `**${pokemon.name}** (ID: ${pokemon.id})
    Height: ${pokemon.height} decimetres (${(pokemon.height / 10).toFixed(1)}m)
    Weight: ${pokemon.weight} hectograms (${(pokemon.weight / 10).toFixed(1)}kg)
    Base Experience: ${pokemon.base_experience || "N/A"}
    Order: ${pokemon.order || "N/A"}
    
    **Types:** ${types}
    **Abilities:** ${abilities}
    **Base Stats:** ${stats}
    
    **Sprites:**
    - Default: ${pokemon.sprites.front_default || "N/A"}
    - Shiny: ${pokemon.sprites.front_shiny || "N/A"}
    ${artworkUrl ? `- Artwork: ${artworkUrl}` : ""}`,
          },
        ],
      };
    }
  • The PokeAPIClient.getPokemon method called by the handler to fetch raw Pokémon data from the PokeAPI.
    async getPokemon(idOrName: string | number): Promise<Pokemon> {
      return this.fetchAPI<Pokemon>(`/pokemon/${idOrName}`);
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool fetches 'detailed information', which implies a read-only operation, but doesn't specify what 'detailed' includes, potential rate limits, authentication needs, error handling, or response format. This leaves significant gaps for a tool with no annotation coverage.

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 a single, clear sentence with no wasted words. It's front-loaded with the core purpose and efficiently specifies the input method. Every part of the sentence contributes essential information, making it appropriately concise.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, how results are structured, or any behavioral traits like error cases. For a tool with rich sibling context and no structured support, more detail is needed to guide effective usage.

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 input schema has 100% description coverage, with the parameter 'name' documented as accepting 'name or ID'. The description adds no additional semantic context beyond this, such as examples, format constraints, or case sensitivity. With high schema coverage, the baseline is 3, and the description doesn't enhance it further.

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 ('fetch detailed information') and resource ('about a Pokémon'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'search_pokemon' or 'get_pokemon_encounters', which likely have overlapping functionality. A perfect score would require explicit distinction from these alternatives.

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 like 'search_pokemon' or 'get_pokemon_encounters'. It mentions fetching by 'name or ID', but doesn't clarify if this is for exact matches only or how it differs from search functionality. No exclusions or prerequisites are mentioned.

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/hollanddd/pokedex-mcp'

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