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

NameTypeRequiredDescription
categorystringnoJoke category. One of: Any, Programming, Misc, Dark, Pun, Spooky, Christmas. Defaults to “Any”.
typestringnoJoke type. One of: single, twopart. Omit to allow either type.
safe_modebooleannoWhen 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

FieldTypeDescription
typestringJoke type
categorystringJoke category
safebooleanWhether joke is flagged as safe
jokestringFull joke text for single-part jokes
setupstringSetup text for two-part jokes
deliverystringPunchline 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.

Regenerated from source · build May 9, 2026