The Problem
AI coding assistants write great code structure, but they hallucinate values that should be computed.
Real Coding Scenarios Where LLMs Fail
These happen every day when AI assists with writing code, tests, and configurations.
Writing Test Fixtures with Hashes
You: "Write a test that verifies our password hashing. Use 'testpassword123' as the input."
expect(hash).toBe("5e884898da28047d...")
Hallucinated hash that doesn't match actual SHA-256 output. Test fails.
hash/sha256 first, gets the real hash, writes a passing test.
Generating Seed Data for Databases
You: "Create a seed file with 5 users, each with a unique UUID"
{ id: "user-1-uuid-here" }, { id: "user-2-uuid-here" }...
Placeholder text or malformed UUIDs that fail database constraints.
generate/uuid five times, inserts real RFC 4122 UUIDs. Database accepts them.
Base64 Encoding API Keys in Config
You: "Encode this API key for the config file: sk_live_abc123xyz"
ENCODED_KEY: "c2tfbGl2ZV9hYmMxMjN4eXo=="
Often wrong—LLMs can't reliably do Base64 encoding in their head.
encode/base64, gets c2tfbGl2ZV9hYmMxMjN4eXo= (correct encoding).
Writing Regex Patterns
You: "Write a regex to validate email addresses"
/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/
Misses edge cases: plus signs, long TLDs, internationalized domains.
validate/email for validation, or regex/email_pattern for a battle-tested regex.
Creating URL Slugs
You: "Generate a URL slug for 'Héllo Wörld! This is a TEST...'"
"hello-world-this-is-a-test"
Often inconsistent with special characters, accents, multiple spaces.
string/slug → "hello-world-this-is-a-test" with consistent, deterministic rules.
How It Works in Practice
When Claude Code has TinyFn tools, it calls them automatically before writing code that depends on computed values.
You request code
"Write a migration that adds a hashed API key column with a default value"
Claude calls the tool
Runs hash/sha256 on the default key to get the actual hash
Writes correct code
Migration includes the real hash value, not a hallucinated one
Tools for Everyday Coding Tasks
These tools solve the most common "I need a real value here" problems in code generation.
generate/uuid
Test fixtures, seed data, migrations
hash/sha256
Test assertions, checksums, auth
encode/base64
Config files, API keys, tokens
validate/email
Form validation, input checking
validate/json
Config validation, API responses
string/slug
URLs, filenames, identifiers
regex/test
Pattern validation in tests
generate/password
Test accounts, seed users
{
"mcpServers": {
"tinyfn": {
"url": "https://api.tinyfn.io/mcp/all/",
"headers": {
"X-API-Key": "your-api-key"
}
}
}
}
Setup in 2 Minutes
- Works with Claude Code, Cursor, Windsurf, and any MCP client
-
Use
/mcp/allfor all tools, or pick specific categories - Same API key as REST API, same rate limits
Write better code with AI
Get your free API key and give your coding assistant the tools it needs.