Skip to main content
Glama
drewsungg

Pokemon Showdown MCP Server

by drewsungg

get_item

Retrieve detailed battle effects for held items in Pokemon Showdown. Enter an item name to get its in-game functionality and strategic impact.

Instructions

Look up a held item by name. Returns full description of what the item does in battle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesItem name (e.g., 'choice-scarf', 'leftovers', 'life-orb')

Implementation Reference

  • Core handler function that loads item data if needed, normalizes the input name to a dictionary key (lowercase, no spaces or hyphens), and retrieves the item data from the pre-loaded items.json cache.
    def get_item(self, name: str) -> dict | None: """ Get item data by name. Args: name: Item name (case-insensitive) Returns: Item data dict or None if not found """ self.load_all() key = name.lower().replace(" ", "").replace("-", "") return self.items.get(key)
  • Registers the 'get_item' tool with the MCP server in the list_tools() function, defining its name, battle-focused description, and input schema requiring a single 'name' string parameter.
    Tool( name="get_item", description="Look up a held item by name. Returns full description of what the item does in battle.", inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Item name (e.g., 'choice-scarf', 'leftovers', 'life-orb')" } }, "required": ["name"] } ),
  • Tool dispatch handler in call_tool(): invokes the data loader's get_item, formats the result using format_item_response if found, or returns a not-found message.
    elif name == "get_item": item = loader.get_item(arguments["name"]) if item: return [TextContent(type="text", text=format_item_response(item))] return [TextContent(type="text", text=f"Item '{arguments['name']}' not found.")]
  • Helper function to format raw item dictionary into a structured markdown response, including the item's effect description and optional short summary.
    def format_item_response(item: dict) -> str: """Format item data into a readable response.""" name = item.get("name", "Unknown") desc = item.get("desc", item.get("shortDesc", "No description.")) short_desc = item.get("shortDesc", "") response = f"""## {name} ### Effect {desc} """ if short_desc and short_desc != desc: response += f"\n### Summary\n{short_desc}\n" return response
  • Input schema definition for the 'get_item' tool, specifying an object with a required 'name' string property and example item names.
    inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Item name (e.g., 'choice-scarf', 'leftovers', 'life-orb')" } }, "required": ["name"] }

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