Home/Tools/fish-joke-generator

default

fish-joke-generator

Generate hilarious fish-themed jokes with AI SDK tools. Use with Vercel AI SDK agents to add humor, or call directly for puns, dad jokes, and ocean humor. Perfect for chatbots and entertainment.

Official
text-analysis
v1.1.0
MIT
⚠️

This tool is currently broken

Import Failed
Cannot load from Railway service
Invalid AI SDK tool structure (missing description or execute)

Last checked: 12/29/2025, 9:21:15 AM

Interactive Playground

Test fish-joke-generator (default) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install fish-joke-generator
pnpm add fish-joke-generator

2. Import the tool

import { default } from 'fish-joke-generator';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { default } from 'fish-joke-generator';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { default },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Parameters

Available configuration options

No schema

No schema available for this tool.

README

Fish Joke Generator

Use the Fish Joke Generator tool in your AI SDK agent with just a few lines of code.

Installation

npm install fish-joke-generator

Usage

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { getFishJokeTool } from 'fish-joke-generator';

const result = await generateText({
  model: openai('gpt-4'),
  prompt: 'Tell me a funny fish joke',
  tools: {
    getFishJoke: getFishJokeTool(),
  },
  maxSteps: 5,
});

console.log(result.text);

Quick Start (Without AI SDK)

import { getRandomFishJoke } from 'fish-joke-generator';

const joke = getRandomFishJoke();
console.log(`${joke.setup}\n${joke.punchline}`);

Available Tools

getFishJokeTool()

Returns a tool for AI SDK that generates fish jokes.

Parameters:

  • category (optional): 'pun' | 'dad' | 'ocean' | 'random'
  • rating (optional): 'family-friendly' | 'groan-worthy' | 'fin-tastic'

Example:

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { getFishJokeTool } from 'fish-joke-generator';

const result = await generateText({
  model: openai('gpt-4'),
  prompt: 'Tell me a groan-worthy fish pun',
  tools: {
    getFishJoke: getFishJokeTool(),
  },
});

getMultipleFishJokesTool()

Returns a tool for AI SDK that generates multiple fish jokes.

Parameters:

  • count: number of jokes to generate
  • category (optional): 'pun' | 'dad' | 'ocean' | 'random'

Example:

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { getMultipleFishJokesTool } from 'fish-joke-generator';

const result = await generateText({
  model: openai('gpt-4'),
  prompt: 'Give me 3 ocean-themed fish jokes',
  tools: {
    getMultipleFishJokes: getMultipleFishJokesTool(),
  },
});

Direct API Usage

getRandomFishJoke(category?)

Get a random fish joke without using the AI SDK.

import { getRandomFishJoke } from 'fish-joke-generator';

const joke = getRandomFishJoke('pun');
console.log(joke.setup);     // "What do you call a fish with no eyes?"
console.log(joke.punchline); // "A fsh!"

createFishJoker(options?)

Create a fish joker instance with custom options.

import { createFishJoker } from 'fish-joke-generator';

const joker = createFishJoker();

// Get a single joke
const joke = joker.getJoke('dad');

// Get multiple jokes
const jokes = joker.getJokes(5, 'ocean');

// Get all jokes from a category
const allPuns = joker.getJokesByCategory('pun');

// Format a joke
console.log(joker.formatJoke(joke, 'question-answer'));

TypeScript Types

interface FishJoke {
  setup: string;
  punchline: string;
  category: 'pun' | 'dad' | 'ocean' | 'random';
  rating?: 'family-friendly' | 'groan-worthy' | 'fin-tastic';
}

type JokeCategory = 'pun' | 'dad' | 'ocean' | 'random';

interface JokeOptions {
  rating?: 'family-friendly' | 'groan-worthy' | 'fin-tastic';
  includeCategory?: boolean;
  format?: 'standard' | 'one-liner' | 'question-answer';
}

Example Jokes

Puns:

  • "What do you call a fish that practices medicine?" → "A sturgeon!"
  • "What do you call a fish magician?" → "A magic carp!"

Dad Jokes:

  • "Did you hear about the fish that went bankrupt?" → "Now he's a loan shark!"
  • "What did the fish say when he posted bail?" → "I'm off the hook!"

Ocean Humor:

  • "Why are fish so smart?" → "Because they live in schools!"
  • "How do shellfish get to the hospital?" → "In a clambulance!"

Features

  • 🐟 23+ hand-crafted fish jokes
  • 🤖 AI SDK compatible tools
  • ✅ Full TypeScript support
  • 🎲 Random joke selection
  • ⭐ Joke ratings and categories
  • 🎨 Multiple formatting options
  • 📦 Zero dependencies (AI SDK is peer dependency)

Use Cases

  • Add humor to AI chatbots and agents
  • Generate entertaining placeholder content
  • Create comedy applications
  • Lighten up error messages
  • Icebreakers for meetings
  • Educational marine life content

Contributing

Have a fin-tastic fish joke to add? Contributions are welcome! Please submit a Pull Request.

License

MIT


Made with ❤️ and 🐟 for the AI SDK community

Statistics

Downloads/month

1,034

Quality Score

60%

NPM Keywords

tpmjs-tool
fish
jokes
humor
comedy
entertainment
fun
ai
ai-sdk
vercel-ai
openai
zod

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)
default | TPMJS | TPMJS