One sentence in, one live agent tool out
This ran on the cloudlet serving this page. The generator reports its own execution time: 3.03 seconds from the sentence to a live, typed, documented tool over a SQLite table. Nothing below is mocked. The last panel is a public endpoint you can call right now, and the full measured ledger is in From Prompt to MCP Tool in 5 Seconds.
Describe the tool the way you would document it
The prompt becomes the tool description your agent reads, so it is written like a docstring: what it returns, who wants it, and the argument with its type.
Returns the daily trend of anonymous carbon footprint submissions, one entry per day, so a caller can see how many people submitted and how heavy their average footprint was. Takes days, an integer, defaulting to 7.
A readable file, verified against the runtime, live the moment it lands
Verbatim apart from the abbreviated comment. No build, no restart, no registration. The argument type became the tool's JSON Schema type; nobody wrote a schema.
// Returns the daily trend of anonymous carbon footprint submissions, one entry per day [...]
.arguments
days:int
validators.default:x:@.arguments
days:int:7
data.connect:billionair
data.select:"select date(created) as day, count(*) as submissions, avg(total_kg) as average_total_kg from footprints where created >= date('now', '-' || @days || ' day') and total_kg > 0 group by day order by day desc"
days:x:@.arguments/*/days
return-nodes:x:@data.select/*
The same endpoint an agent calls, over plain HTTP
This one is public and read-only. Inside Claude it appears as a tool named after the endpoint, described by the sentence above, with days as an integer parameter.
$ curl "https://hyperlambda.dev/magic/modules/mcp-demo/footprint-trend?days=365"
[{"day":"2026-09-02","submissions":2,"average_total_kg":8150.0},
{"day":"2026-09-01","submissions":1,"average_total_kg":13400.0}, ...]