ai newsDo., 29. Okt.
EilmeldungLinux-Lücke: Claude schreibt Root-Exploit, Ubuntu und RHEL ohne Patch

15 deterministic tools your AI agent should call instead of guessing

Ask an LLM whether EKU9003173C9 is a valid Mexican RFC, what the German VAT rate was on a given date, or which HTS code applies to a stainless steel sink, and you get a confident answer. Sometimes it is right. For an invoicing, KYC or customs agent, "sometimes" is not good enough: a check digit is

dev.toDonnerstag 20:09 · 29.10.3 Min. Lesezeit
Bild: dev.to

Ask an LLM whether EKU9003173C9 is a valid Mexican RFC, what the German VAT rate was on a given date, or which HTS code applies to a stainless steel sink, and you get a confident answer. Sometimes it is right. For an invoicing, KYC or customs agent, "sometimes" is not good enough: a check digit is either correct or not, a tariff code is either in the official schedule or not, and a payroll withholding comes from a published table, not from a model's memory.

This post is about the class of work an agent should delegate to deterministic tools and how we packaged 15 of them as one MCP server on Apify. Everything runs against official or open sources, has no LLM inside, stores nothing, and costs half a cent per call.

Three tests. If the answer (1) has a published algorithm or table, (2) is needed many times per task (one call per invoice, supplier, shipment or employee) and (3) is expensive to get wrong, it belongs in a tool. Business validation passes all three:

Every answer carries the same envelope: ok, the result, source, sourceUrl, sourceDate or tableVersion, and scrapedAt. Items that cannot be answered ( INVALID_INPUT, UNSUPPORTED_COUNTRY, SOURCE_UNAVAILABLE ) come back with ok: false and are never charged.

The Actor runs as a Streamable HTTP MCP server. Add it to Claude Desktop, Cursor, VS Code or any MCP client:

{ "mcpServers": { "hexadata-validation": { "url": "https://hexadatalabs--business-validation-tools-mcp.apify.actor/mcp", "headers": { "Authorization": "Bearer <APIFY_TOKEN>" } } } } Enter fullscreen mode Exit fullscreen mode Then ask: "Validate these supplier tax IDs: MX EKU9003173C9, ES B12345674 and BR 11.222.333/0001-81, and tell me which are malformed." The agent calls validate_tax_id once with three items and reports the valid and reason fields instead of guessing.

Batch mode takes { tool, items[], params } and writes one dataset row per item. One HTTP call, synchronous:

curl -s -X POST "https://api.apify.com/v2/acts/hexadatalabs~business-validation-tools-mcp/run-sync-get-dataset-items?token= $APIFY_TOKEN " \ -H "Content-Type: application/json" \ -d '{"tool":"validate_iban","items":[{"iban":"DE89 3704 0044 0532 0130 00"},{"iban":"DE89370400440532013001"}]}' Enter fullscreen mode Exit fullscreen mode The second IBAN comes back with valid: false, reason: "INVALID_CHECK_DIGITS". In n8n or Make, use the Apify node with "Run an Actor and get dataset items" and the same JSON.

from apify_client import ApifyClient client = ApifyClient ( " <APIFY_TOKEN> " ) run = client. actor ( " hexadatalabs/business-validation-tools-mcp " ). call ( run_input = { " tool ": " calc_payroll_mx ", " items ": [{ " monthlyGross ": 20000, " riskClass ": " I ", " year ": 2026 }], }) for item in client. dataset ( run [ " defaultDatasetId " ]). iterate_items (): print ( item [ " isr " ], item [ " imssEmployee " ][ " total " ], item [ " net " ], item [ " employerCost " ], item [ " tableVersion " ]) Enter fullscreen mode Exit fullscreen mode Agents without an account: USDC via x402 The Actor runs with limited permissions, so an agent can buy a prepaid Apify token with USDC through a Coinbase Agentic Wallet (x402) and call it with no Apify account. $1 USDC ≈ 200 single calls or 500 batch items.

$0.005 per single-item call, $0.002 per item when a call carries 2–500 items. 1,000 IBAN checks ≈ $2; 5,000 supplier tax IDs across 12 countries ≈ $10; 100 Mexican payroll calculations ≈ $0.20. Invalid input is free.

It checks formats and check digits, not registries (except VIES and GLEIF, which are live). It does not return bank names for ABA or BIC (those directories forbid commercial redistribution). Text search over code systems is a deterministic word match, not semantic search. It is a calculation aid, not tax advice.

Full documentation, the per-tool input and output fields and the legal notes are on the Actor page. Missing a country or a catalog? Open an issue with the official source and we add it.

Quelle: dev.to (dev.to). Original öffnen