Fun Utilities

Yes No

Need a quick decision? This tool returns a random "yes" or "no" answer via GET /v1/fun/yes-no. Perfect for AI agents making binary choices or developers needing deterministic randomness in workflows. Simple JSON response with consistent formatting across MCP integrations in Cursor and Windsurf.

API Endpoint

GET /v1/fun/yes-no

Code Examples

curl "https://tinyfn.io/v1/fun/yes-no" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/fun/yes-no', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/fun/yes-no',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's fun tools:

{
  "mcpServers": {
    "tinyfn-fun": {
      "url": "https://tinyfn.io/mcp/fun",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What does the yes-no tool actually return?

Returns JSON with either "yes" or "no" as the answer value, providing a simple binary decision.

How can AI agents use this for decision making?

Agents can call this via MCP to make random choices in workflows, break ties, or simulate coin flips with consistent yes/no responses.

Is the randomness truly random or deterministic?

Uses pseudo-random generation that's deterministic within sessions but varies between calls, ensuring reproducible behavior for testing.

Can I use this instead of Math.random() for binary decisions?

Yes, especially useful when you need consistent JSON formatting or want to externalize decision logic from your application code.

Does this work the same way across all MCP tools?

Identical behavior in Cursor, Claude Code, Windsurf, and other MCP-enabled editors, with the same JSON response format.

Try Yes No Now

Get your free API key and start using Yes No in seconds.

Get Free API Key