Process results programmatically changedagents-and-tools/tool-use/programmatic-tool-calling
Nearest release: v2.1.307, published 4 hours after 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+10added
Lines−14removed
From line
194
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits14to this page, all time
The whole hunk
from line 194, old and new numbered
/
from line 194
194194 Model = Model.ClaudeOpus5_5,
195195 MaxTokens = 4096,
196196 Messages = [
197 new() {
198 Role = Role.User,
197 new UserMessageParam {
199198 Content = "Query sales data for the West, East, and Central regions, then tell me which region had the highest revenue"
200199 }
201200 ],
from line 803
804803 Container = "container_xyz789",
805804 Messages =
806805 [
807 new()
806 new UserMessageParam
808807 {
809 Role = Role.User,
810808 Content = "Query customer purchase history from the last quarter and identify our top 5 customers by revenue"
811809 },
812 new()
810 new AssistantMessageParam
813811 {
814 Role = Role.Assistant,
815812 Content = new ContentBlock[]
816813 {
817814 new TextBlock { Text = "I'll query the purchase history and analyze the results." },
from line 831
834831 }
835832 }
836833 },
837 new()
834 new UserMessageParam
838835 {
839 Role = Role.User,
840836 Content = new ContentBlockParam[]
841837 {
842838 new ToolResultBlockParam
from line 950
954950 .maxTokens(4096L)
955951 .container("container_xyz789")
956952 .addUserMessage("Query customer purchase history from the last quarter and identify our top 5 customers by revenue")
957 .addAssistantMessageOfBlockParams(List.of(
953 .addAssistantMessageOfContentBlockParams(List.of(
958954 ContentBlockParam.ofText(
959955 TextBlockParam.builder()
960956 .text("I'll query the purchase history and analyze the results.")
from line 958
962958 ContentBlockParam.ofServerToolUse(
963959 ServerToolUseBlockParam.builder()
964960 .id("srvtoolu_abc123")
965 .name("code_execution")
961 .name(ServerToolUseBlockParam.Name.CODE_EXECUTION)
966962 .input(JsonValue.from(Map.of("code", "...")))
967963 .build()),
968964 ContentBlockParam.ofToolUse(
from line 969
973969 .codeExecution20260120Caller("srvtoolu_abc123")
974970 .build())
975971 ))
976 .addUserMessageOfBlockParams(List.of(
972 .addUserMessageOfContentBlockParams(List.of(
977973 ContentBlockParam.ofToolResult(
978974 ToolResultBlockParam.builder()
979975 .toolUseId("toolu_def456")
No line in this hunk matches that.