get_joke
Pack: jokes · Endpoint: https://gateway.pipeworx.io/jokes/mcp
Get a random joke, optionally filtered by category (e.g., ‘general’, ‘programming’) or type (‘single’ or ‘twopart’). Returns joke text, category, and content flags.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
category | string | no | Joke category. One of: Any, Programming, Misc, Dark, Pun, Spooky, Christmas. Defaults to “Any”. |
type | string | no | Joke type. One of: single, twopart. Omit to allow either type. |
safe_mode | boolean | no | When true, only return jokes that are flagged safe by JokeAPI. Defaults to true. |
Example call
Arguments
{
"category": "Programming",
"type": "single",
"safe_mode": true
}
curl
curl -X POST https://gateway.pipeworx.io/jokes/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_joke","arguments":{"category":"Programming","type":"single","safe_mode":true}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_joke', {
"category": "Programming",
"type": "single",
"safe_mode": true
});
More examples
{
"category": "Dark",
"safe_mode": false
}
Response shape
Always returns: type, category, safe
| Field | Type | Description |
|---|---|---|
type | string | Joke type |
category | string | Joke category |
safe | boolean | Whether joke is flagged as safe |
joke | string | Full joke text for single-part jokes |
setup | string | Setup text for two-part jokes |
delivery | string | Punchline for two-part jokes |
Full JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"single",
"twopart"
],
"description": "Joke type"
},
"category": {
"type": "string",
"description": "Joke category"
},
"safe": {
"type": "boolean",
"description": "Whether joke is flagged as safe"
},
"joke": {
"type": "string",
"description": "Full joke text for single-part jokes"
},
"setup": {
"type": "string",
"description": "Setup text for two-part jokes"
},
"delivery": {
"type": "string",
"description": "Punchline for two-part jokes"
}
},
"required": [
"type",
"category",
"safe"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"jokes": {
"url": "https://gateway.pipeworx.io/jokes/mcp"
}
}
}
See Getting Started for client-specific install steps.