Number MCP Tools for AI Agents

"What's 1437 in Roman numerals?" Your agent says MCDXXXVII. Is that right? (It is — this time.) But ask about 3999 or 49 and errors creep in. These tools convert between number representations correctly.

All Number Tools (20)

Your agent gets access to 20 number tools via the /mcp/number/ endpoint. Here's the complete list:

ToolDescription
number/factorsPrime Factors
number/divisorsGet Divisors
number/nth-primeNth Prime
number/primes-in-rangePrimes In Range
number/romanTo Roman
number/base-convertBase Convert
number/is-perfectIs Perfect Number
number/is-armstrongIs Armstrong Number
number/is-palindromeIs Palindrome Number
number/collatzCollatz Sequence
number/digital-rootDigital Root
number/sum-digitsSum Digits
number/reverseReverse Number
number/count-digitsCount Digits
number/triangularNth Triangular
number/is-triangularIs Triangular
number/squareNth Square
number/cubeNth Cube
number/is-power-ofIs Power Of
number/nearest-powerNearest Power

Agent Scenarios

Here's how real agents use these tools:

1. Report generation agent

A reporting agent converts numbers to ordinals (1st, 2nd, 3rd) for natural-sounding text.

Tool Call: number/ordinal
{ "number": 42 }

2. Legal document agent

A document agent converts dollar amounts to written words for legal contracts.

Tool Call: number/to-words
{ "number": 15750 }

3. Design system agent

A UI agent converts numbers to Roman numerals for chapter or section numbering.

Tool Call: number/to-roman
{ "number": 2026 }

MCP Setup

Add number tools to your agent in under 2 minutes. Choose your client:

Claude Desktop / Claude Code

Add this to your MCP config:

{
  "mcpServers": {
    "tinyfn-number": {
      "url": "https://api.tinyfn.io/mcp/number/",
      "headers": {
        "X-API-Key": "your-api-key"
      }
    }
  }
}

Cursor

Go to Settings > MCP and add a new server:

  • Type: SSE
  • URL: https://api.tinyfn.io/mcp/number/sse
  • Headers: X-API-Key: your-api-key

Tip: Use the category-specific endpoint (/mcp/number/) for the best experience. The all-in-one endpoint (/mcp/all/) works too but has 500+ tools which some clients handle less efficiently.

When to Use These Tools

Use number MCP tools when your agent needs to:

  • Guarantee correctness — when wrong answers have real consequences
  • Process user data — when you're operating on actual user input, not hypothetical examples
  • Maintain consistency — when the same input must always produce the same output

You don't need these tools for casual conversation or rough estimates. Use them when precision matters.

Ready to add number tools to your agent?

Get Free API Key 100 requests/month free. No credit card required.

Frequently Asked Questions

What number representations does TinyFn support?

TinyFn converts numbers to ordinals (1st, 2nd, 3rd), written words (one hundred twenty-three), Roman numerals, and various formatted representations.

What's the range for Roman numeral conversion?

TinyFn converts integers from 1 to 3999 (the standard range for Roman numerals using basic symbols I, V, X, L, C, D, M).

Does number-to-words handle decimals?

Yes. TinyFn can convert decimal numbers to words, handling both the integer and fractional parts.

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key