Tightening Tool Schemas From the Arguments You See in Production
Record the arguments Claude actually passes to your tools in production, then use that distribution to add enums and patterns back into your JSON Schema. With logging code and before/after numbers.
Let Claude Actually See the Images Your Tools Return — Use Image Blocks in tool_result and Cut Tokens by Roughly 10x
Stuffing a base64 string into a tool_result makes the same image cost roughly 10–20x more tokens. Here is how to return it as an image content block instead, with SDK code, a token-cost estimate, and the gotchas I hit in production.
Trusting Claude's Structured Output in Production — Validation Gates and Repair Loops
When Claude's structured output breaks 'occasionally' in production, combine tool-use enforcement, a schema validation gate, a single repair loop, and a graceful degradation fallback to eliminate broken JSON from your operations — with working TypeScript code.
Claude Vision API in Production — Implementation Patterns for Image Analysis, PDF Processing, and OCR
Implementation patterns for taking Claude's vision capabilities to production: choosing between Base64, URL, and the Files API, native PDF processing, schema-enforced extraction with Tool Use, batch cost reduction, and error recovery — all with working code.
Why JSON.parse Fails on Claude API Streaming tool_use Arguments — and How to Fix It
When you stream a Claude API response with tool_use, calling JSON.parse on each input_json_delta throws SyntaxError. Here is the correct way to assemble partial_json fragments, plus disconnect handling.
Recovering from Claude Code's 'Tool result could not be submitted'
What 'Tool result could not be submitted' really means in Claude Code, and the practical recovery steps I rely on after years of running indie apps with 50M+ downloads through it.
Building an Autonomous Research Agent with Claude API: Web Search, Summarization, and Knowledge Management
A complete guide to designing and implementing an autonomous research agent using Claude API and web search tools. Covers budget control, quality assurance, and knowledge base storage for production use.
Claude API × Tauri 2: Building a Production Desktop AI App With Rust — Streaming, Tool Use, and Signed Distribution
A complete guide to shipping a production-grade desktop AI app with Tauri 2 and the Claude API: keychain-backed key storage, an SSE streaming bridge in Rust, Tool Use, and macOS/Windows signed distribution — with code you can copy.
Building a GitHub PR Review Bot with Claude API — From Webhook Signature Verification to Structured Reviews with Tool Use
Build a production PR review bot with Claude API and GitHub Webhooks. Enforce structured scoring, security scanning, and suggestions via Tool Use — with signature verification, debouncing, rate limits, and cost tracking drawn from real-world operation.
Claude MCP Hybrid Architecture — Design Patterns for Combining Deterministic Tools with AI Reasoning
Learn how to build reliable AI agents using Claude MCP hybrid architecture. Combine deterministic tools with AI reasoning using patterns inspired by Andrew Ng's Tool Use framework.
Claude API Programmatic Tool Calling (PTC) Production Guide — 10x Faster Multi-Tool Workflows
Master Programmatic Tool Calling (PTC) in the Claude API to dramatically reduce latency and token costs in multi-tool workflows. Learn production patterns combining PTC with Tool Search and Input Examples.
Claude API Advanced Tool Use: Tool Search, Programmatic Tool Calling, and Tool Use Examples
Master Claude API's advanced tool use features (Tool Search, Programmatic Tool Calling, Tool Use Examples) now GA. Build production-grade agents with 85% token reduction, 37% latency improvement, and 90% parameter accuracy.