get_a_joke
Generate a humorous joke based on a specified animal for entertainment or testing purposes, leveraging the MCPunk server's functionality.
Instructions
Get a really funny joke! For testing :)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| animal | Yes |
Implementation Reference
- mcpunk/tools.py:214-224 (handler)The handler function implementing the get_a_joke tool logic. Registered via @mcp.tool() decorator. Includes inline schema for the 'animal' parameter.@mcp.tool() @log_inputs_outputs() def get_a_joke(animal: Annotated[str, Field(max_length=20)]) -> ToolResponse: """Get a really funny joke! For testing :)""" return MCPToolOutput( text=( f"Why did the {animal} cross the road?\n" f"To get to the other side!\n" f"Because it was a {animal}." ), ).render()