top | item 46885727

Show HN: TinyFn – Your agent sucks at math

3 points| tacoooooooo | 27 days ago |tinyfn.io

I built TinyFn because I kept watching AI agents confidently get basic things wrong — math, string counting, unit conversions, validations. The classic "how many R's in strawberry" problem, but across hundreds of utility tasks.

TinyFn is a collection of 500+ deterministic utility endpoints (math, string ops, hashing, validation, conversions, etc.) that AI agents can call via MCP instead of guessing. (Also works as a plain REST API). Think of it as offloading the stuff you wouldn't ask a human to do in their head either.

I'd love feedback on which tool categories are most useful, and what's missing. Happy to answer any questions. https://tinyfn.io

9 comments

order

jredwards7|22 days ago

This is the right instinct. LLMs are great at proposing actions, but they're fundamentally unreliable at enforcing deterministic invariants.

Math is the obvious example, but schema validation falls into the same bucket. If an agent outputs structured JSON, the question "does this conform to the declared schema?" should have exactly one answer. Same schema + same payload → same result, every time, regardless of runtime, language, or retry.

Once you treat that layer as deterministic infrastructure instead of model behavior, a few things get easier:

• retries stop producing inconsistent side effects • downstream systems can trust that validation actually ran • you can audit what passed structural checks independently of the model

Semantic correctness is still a separate problem (models or domain rules are needed there) but offloading the structural layer removes a lot of accidental complexity.

One example of what that deterministic validation layer looks like as a standalone API: https://docs.rapidtools.dev/openapi.yaml

jqpabc123|27 days ago

LLMs hallucinate math, fumble conversions, and make up validations.

So let's obscure (partially) the inadequacies of LLMs?

This way, we can skip past the obvious and move on to making really big mistakes using LLMs.

tacoooooooo|27 days ago

Humans are also bad at math! So we created calculators. LLMs should have the same access to tools to give them the best opportunity to succeed

maxloh|26 days ago

I don't really get it.

While these functions sound useful, the logic seems simple enough that you could just prompt an LLM with the documentation and get a working codebase without actually subscribing to the hosted service.

Where is the commercial value of it?