Follow Discord
Sweep 03 Nov 2026 · 22:27Z Build v2.1.318 536 read Stable v2.1.311 Latest v2.1.318 Next v2.1.318 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Process results programmatically changedagents-and-tools/tool-use/programmatic-tool-calling

Nearest release: v2.1.318, published 4 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+18added
Lines−16removed
From line 50 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits22to this page, all time

The whole hunk

from line 50, old and new numbered
/
lines
from line 50
5050 ```bash cURL
5151 curl https://api.anthropic.com/v1/messages \
5252 -H "x-api-key: $ANTHROPIC_API_KEY" \
53 -H "anthropic-version: 2023-06-01" \
53 -H "anthropic-version: 2026-10-21" \
5454 -H "content-type: application/json" \
5555 -d '{
5656 "model": "claude-opus-5-5",
from line 528
528528 ```bash cURL
529529 curl https://api.anthropic.com/v1/messages \
530530 -H "x-api-key: $ANTHROPIC_API_KEY" \
531 -H "anthropic-version: 2023-06-01" \
531 -H "anthropic-version: 2026-10-21" \
532532 -H "content-type: application/json" \
533533 -d '{
534534 "model": "claude-opus-5-5",
from line 810
810810 },
811811 new AssistantMessageParam
812812 {
813 Content = new ContentBlock[]
813 Content = new List<ContentBlockParam>
814814 {
815 new TextBlock { Text = "I'll query the purchase history and analyze the results." },
816 new ServerToolUseBlock
815 new TextBlockParam { Text = "I'll query the purchase history and analyze the results." },
816 new ServerToolUseBlockParam
817817 {
818 Id = "srvtoolu_abc123",
819 Name = "code_execution",
820 Input = new { code = "..." }
818 ID = "srvtoolu_abc123",
819 Name = ServerToolUseBlockParamName.CodeExecution,
820 Input = new Dictionary<string, JsonElement>
821 {
822 ["code"] = JsonSerializer.SerializeToElement("..."),
823 }
821824 },
822 new ToolUseBlock
825 new ToolUseBlockParam
823826 {
824 Id = "toolu_def456",
827 ID = "toolu_def456",
825828 Name = "query_database",
826 Input = new { sql = "<sql>" },
827 Caller = new ToolCaller
829 Input = new Dictionary<string, JsonElement>
828830 {
829 Type = "code_execution_20260120",
830 ToolId = "srvtoolu_abc123"
831 }
831 ["sql"] = JsonSerializer.SerializeToElement("<sql>"),
832 },
833 Caller = new ServerToolCaller20260120 { ToolID = "srvtoolu_abc123" }
832834 }
833835 }
834836 },
835837 new UserMessageParam
836838 {
837 Content = new ContentBlockParam[]
839 Content = new List<ContentBlockParam>
838840 {
839841 new ToolResultBlockParam
840842 {
Feedback