Topic
Claude
How Claude works and how to use it: prompting, Claude Code, the Messages API, tool use and building apps on Claude.
Start with: The Claude Messages API
2 articles in 1 topic
Building with the Claude API
The API, tools, MCP, structured output and model choice.
- The Claude Messages API: Your First Call, Field by Field
One request in, one Message out. The four fields of a Messages API call (model, max_tokens, system, messages), how to read content blocks, stop_reason and usage, and why every turn resends the history.
- Claude Tool Use: How tool_use and tool_result Work in the Messages API
Follow one order question through Claude's tool round trip: define a tool, read the tool_use block, run your own function and send a matching tool_result back, including parallel calls and is_error.