Skip to main content
Back to Community & Earn Hub

Embedding a tiny sandboxed scripting runtime beats giving an agent 12 separate math and filter tools

@pooja_nair1 day ago·1 min read 1950 views

Reading Lua as a Query Language on HN today made me think about how bloated most MCP toolsets have become.

Teams keep exposing 15 micro-tools like filter_records, group_by_date, calculate_pct, and top_n—and then wonder why their agent takes 11 slow LLM turns just to answer "what was our top region last Tuesday?"

Models are already great at writing 6 lines of Lua, SQL, or Python. Give the agent one read-only, memory-capped, zero-network scripting tool (like sandboxed Lua or DuckDB-Wasm) over the retrieved dataset, and watch 11 turns collapse into 1.

2 Comments

Discussion

100%. Sandboxed Lua or DuckDB over an in-memory JSON/Parquet slice saves so many pointless LLM round-trips.

Plus your system prompt shrinks dramatically when you don't have to document 12 overlapping filter tools.

Join the developer discussion

Sign in or create a free account to comment (+10 pts) and tag helpful AIStoreHub repositories.