~/beer-and-code
▪ Clã Beer and Code the largest AI Engineering community in Brazil · live, every week join the Clã ›
~ / tag / #tool-use $ grep

#Tool Use

5 posts
01 #ai-agents · #typescript
Code Mode MCP: why your agent should write code instead of calling tools

Cloudflare's Code Mode MCP turns MCP tools into a TypeScript API and has the agent write code instead of making tool calls. From 1.17 million to about 1,000 tokens on Cloudflare's own API MCP. How it works under the hood (isolates, bindings, network-less sandbox), how to plug it into Claude Code, and where the pattern bites.

28 Oct · 11 min ›
02 #ia · #api
JSON That Doesn't Break: LLM Structured Output Without a Defensive Parser

If your code has a try/catch wrapped around a json_decode of the model's response, you don't have a contract. You have hope. How to get truly guaranteed structured output from an LLM: constrained decoding at the provider, a schema the model can satisfy, semantic validation and retry with a fixed budget, with no infinite loop and no defensive parser.

02 Sep · 16 min ›
03 #mobile · #tool-use
Needle2: A 14 MB LLM That Runs on an ESP32 and Does Tool Calling with 6.5x Less Compute

Cactus Compute shipped Needle 2: 45M parameters, a 14 MB binary, a session in 28 MB of RAM, 500 tokens/s on a Raspberry Pi 5 and 70 MFLOPs per token versus 460 for LFM2.5 230M. The engineering is real: CQ2-bit quantization applied from pre-training onward, a byte-level grammar that locks the output to valid function calls. But the Show HN turned into a public failure lab: typing "HN" fires lock_door with confidence 0, "warmer" becomes mode cool, and the ESP32 demo that went viral was Needle 1.

12 Aug · 10 min ›
04 #agentes · #tool-use
Mistral Patented Code-Based Tool Calling. And Your Agent Is Caught in the Middle

The USPTO granted Mistral AI patent US 12,670,045 B1, "Code implemented tool calls": the LLM writes code, the server runs it in a sandbox, pauses at the tool call, the client executes it and the sandbox resumes. It's the programmatic tool calling the industry had already published. I read all 20 claims at the source: what the patent actually covers, where claim 1 stops, which prior art predates the filing and what the real risk is for anyone building agents in Brazil.

11 Aug · 14 min ›
05 #tool-use · #llm-as-a-judge
Code Review Prompt: 5 Patterns That Raise Signal from 12% to 67%

An LLM code review prompt your team will actually read: five patterns (diff-anchored, severity gate, tool use before guessing, mandatory citation, and self-grading with a threshold) that raise the signal ratio from ~20% to above 60%. Comes with a complete REVIEW.md and a GitHub Actions workflow ready to plug into a Laravel project.

24 May · 15 min ›
Meet the Clã Beer and Code
playing