Start Debugging

Tag: anthropic-sdk

30 posts · Page 1 of 3

What Is Tool Calling and Why JSON Schemas Matter More Than Prompts
Tool calling is a protocol, not magic: the model emits a structured request matching a JSON Schema you supplied, your code runs it, and the result goes back as a message. The schema and its descriptions are rendered into the model's prompt and, with strict mode, into a decoding grammar, so they shape behaviour more reliably than any system-prompt instruction. Here is how it works on claude-sonnet-5-5 and OpenAI strict mode, with schema patterns that make invalid calls impossible.
What Is the Difference Between an AI Agent and an AI Workflow?
In a workflow, your code decides the next step and the model fills in each step. In an agent, the model decides the next step and your code only executes it. That one question (who owns the control flow) determines cost, latency, testability and failure modes. Here is the distinction as Anthropic, Microsoft Agent Framework and LangGraph define it, with the same task built both ways in Python against claude-haiku-4-5 and claude-sonnet-5-5.
2026-09-28 llmai-agentsmcp
How to Measure an Agent's Fixed Token Overhead Before the First User Token
Every agent request pays for its system prompt, the provider's hidden tool-use preamble, and every tool schema before the user says anything. How to measure that fixed cost with differential count_tokens calls on the Anthropic API, the input_tokens endpoint on OpenAI, an MCP listTools probe, and /context in Claude Code, anchored to claude-opus-5-5, claude-sonnet-5, and @modelcontextprotocol/client 2.1.0.
Next