Skip to main content
Glama
lalrow

AI Makerspace MCP Demo Server

by lalrow

animal_fact

Discover interesting facts about animals by entering the name of any animal species to learn about their behavior, characteristics, or habitat.

Instructions

Get a fun fact about a given animal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
animalNodog

Implementation Reference

  • server.py:68-79 (handler)
    The handler function for the 'animal_fact' tool. It is registered via the @mcp.tool() decorator and fetches a random fact about the specified animal from the 'some-random-api.com' API. Includes input parameter 'animal' with default 'dog', returns a string fact or error message.
    @mcp.tool() def animal_fact(animal: str = "dog") -> str: """Get a fun fact about a given animal.""" try: url = f"https://some-random-api.com/facts/{animal.lower()}" r = requests.get(url) if r.status_code == 200: return r.json().get("fact", "No fact found.") return f"⚠️ API error: {r.status_code}" except Exception as e: return f"❌ Something went wrong: {e}"

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/lalrow/AIE8-MCP-Session'

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