search_jokes

Pack: jokes · Endpoint: https://gateway.pipeworx.io/jokes/mcp

Jokes matching a keyword or phrase search, from the JokeAPI database.

Tool description as the model sees it

Search jokes by keyword or phrase. Returns matching jokes with categories, types, and content flags.

Parameters

NameTypeRequiredDescription
querystringyesKeyword or phrase to search for within joke text.
categorystringnoLimit search to a category. One of: Any, Programming, Misc, Dark, Pun, Spooky, Christmas. Defaults to “Any”.
amountnumbernoNumber of jokes to return. Defaults to 5.
safe_modebooleannoWhen true (the default), only return jokes JokeAPI flags as safe. Set false to include Dark and other unsafe-flagged categories.

Example call

Arguments

{
  "query": "programmer",
  "category": "Programming",
  "amount": 10
}

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":"search_jokes","arguments":{"query":"programmer","category":"Programming","amount":10}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search_jokes', {
  "query": "programmer",
  "category": "Programming",
  "amount": 10
});

More examples

{
  "query": "Christmas",
  "amount": 5
}

Response shape

Always returns: total, query, category, jokes

FieldTypeDescription
totalnumberTotal number of matching jokes
querystringSearch query used
categorystringCategory searched
jokesarrayArray of matching jokes
Full JSON Schema
{
  "type": "object",
  "properties": {
    "total": {
      "type": "number",
      "description": "Total number of matching jokes"
    },
    "query": {
      "type": "string",
      "description": "Search query used"
    },
    "category": {
      "type": "string",
      "description": "Category searched"
    },
    "jokes": {
      "type": "array",
      "description": "Array of matching jokes",
      "items": {
        "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"
        ]
      }
    }
  },
  "required": [
    "total",
    "query",
    "category",
    "jokes"
  ]
}

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 September 15, 2026