Formatting MCP Tools for AI Agents

Your agent tells the user their file is "1073741824 bytes." That's technically correct but useless. It should say "1 GB." Formatting numbers, bytes, currencies, and other values for human display requires consistent rules. These tools handle it.

All Format Tools (15)

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

ToolDescription
format/numberFormat Number
format/currencyFormat Currency
format/percentageFormat Percentage
format/ordinalFormat Ordinal
format/wordsNumber To Words
format/romanNumber To Roman
format/roman-to-numberRoman To Number
format/bytesFormat Bytes
format/phoneFormat Phone
format/credit-cardFormat Credit Card
format/ssnFormat Ssn
format/durationFormat Duration
format/relative-timeFormat Relative Time
format/truncateFormat Truncate
format/listFormat List

Agent Scenarios

Here's how real agents use these tools:

1. Dashboard agent

A reporting agent formats large numbers with commas and appropriate units (1,234,567 or 1.23M).

Tool Call: format/number
{ "number": 1234567, "decimals": 2 }

2. Storage monitoring agent

A DevOps agent converts raw byte counts to human-readable sizes (KB, MB, GB).

Tool Call: format/bytes
{ "bytes": 1073741824 }

MCP Setup

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

Claude Desktop / Claude Code

Add this to your MCP config:

{
  "mcpServers": {
    "tinyfn-format": {
      "url": "https://api.tinyfn.io/mcp/format/",
      "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/format/sse
  • Headers: X-API-Key: your-api-key

Tip: Use the category-specific endpoint (/mcp/format/) 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 format 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 format tools to your agent?

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

Frequently Asked Questions

Why use formatting tools instead of LLM output?

LLMs inconsistently format numbers — sometimes adding commas, sometimes not, sometimes rounding incorrectly. Formatting tools ensure consistent display across all outputs.

What formatting options does TinyFn provide?

TinyFn formats numbers (with decimals, separators), byte sizes (KB/MB/GB), and provides various display formatting utilities.

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key