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
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Keyword or phrase to search for within joke text. |
category | string | no | Limit search to a category. One of: Any, Programming, Misc, Dark, Pun, Spooky, Christmas. Defaults to “Any”. |
amount | number | no | Number of jokes to return. Defaults to 5. |
safe_mode | boolean | no | When 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
| Field | Type | Description |
|---|---|---|
total | number | Total number of matching jokes |
query | string | Search query used |
category | string | Category searched |
jokes | array | Array 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.