Glean 拾遗
Recent picks

2picks · chronological

08-05

What Are Tools? A Precise Walkthrough of LLM Tool Calling

This article walks through LLM tool calling using a simple write-file example. Tools are not magic: each tool is defined by a name, a description, and JSON Schema parameters, then injected into the system prompt. When the model decides to act, it returns only a tool-call message with an id and parameters; nothing actually happens until the developer intercepts that message, executes a matching function, and sends the result back under the same id. Errors are sent back too, so the LLM can adapt its next step. The post is aimed at engineers starting to build agents who want a precise mental model of the loop.

www.aihero.dev · 4 min · Agent Engineering · Agents · LLM
07-06

Better Models: Worse Tools

Pi author discovers that Anthropic's Opus 4.8 and Sonnet 5 inject spurious keys (requireUnique, oldText2, cost, etc.) into the edits[] array of Pi's edit tool, while older models do not. The failure is context-dependent and reproducible in agentic sessions. The post dissects Anthropic's tool calling internals: ANTLM markers, JSON-serialized nested arrays, and Claude Code's extremely forgiving harness that silently filters unknown keys and retries malformed calls. Author hypothesizes that RL post-training over Claude Code's flat old/new_string schema creates a strong prior, making newer models worse at following non-canonical tool schemas. Strict tool invocation fixes the issue, but Anthropic's complexity limits prevent Claude Code from using it. Key takeaway: tool schemas are not distribution-neutral; any harness must inherit Claude Code's quirks.

lucumr.pocoo.org · 14 min · Agent Engineering · AI · Claude Code