Skip to main content
Glama
drewsungg

Pokemon Showdown MCP Server

by drewsungg

get_ability

Retrieve detailed battle descriptions for Pokemon abilities by name, providing competitive strategy information for Pokemon Showdown matches.

Instructions

Look up an ability by name. Returns full description of what the ability does in battle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAbility name (e.g., 'truant', 'intimidate', 'levitate')

Implementation Reference

  • Handler logic in call_tool that executes the get_ability tool: retrieves ability data via loader and returns formatted response or not found message.
    elif name == "get_ability": ability = loader.get_ability(arguments["name"]) if ability: return [TextContent(type="text", text=format_ability_response(ability))] return [TextContent(type="text", text=f"Ability '{arguments['name']}' not found.")]
  • Registers the get_ability tool with the MCP server, including name, description, and input schema requiring 'name' parameter.
    Tool( name="get_ability", description="Look up an ability by name. Returns full description of what the ability does in battle.", inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Ability name (e.g., 'truant', 'intimidate', 'levitate')" } }, "required": ["name"] } ),
  • Input schema for get_ability tool: object with required 'name' string parameter.
    inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Ability name (e.g., 'truant', 'intimidate', 'levitate')" } }, "required": ["name"] }
  • Helper function to format raw ability data dictionary into a markdown-formatted text response.
    def format_ability_response(ability: dict) -> str: """Format ability data into a readable response.""" name = ability.get("name", "Unknown") desc = ability.get("desc", ability.get("shortDesc", "No description.")) short_desc = ability.get("shortDesc", "") response = f"""## {name} ### Effect {desc} """ if short_desc and short_desc != desc: response += f"\n### Summary\n{short_desc}\n" return response
  • Core data retrieval method: normalizes ability name and looks up in loaded abilities dictionary from JSON cache.
    def get_ability(self, name: str) -> dict | None: """ Get ability data by name. Args: name: Ability name (case-insensitive) Returns: Ability data dict or None if not found """ self.load_all() key = name.lower().replace(" ", "").replace("-", "") return self.abilities.get(key)

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/drewsungg/mcpkmn-showdown'

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