Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

search-results changedbuild-with-claude/search-results

Nearest release: v2.1.309, published 3 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+32added
Lines−20removed
From line 518 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits13to this page, all time

The whole hunk

from line 518, old and new numbered
/
lines
from line 518
518518 input.get("query").asStringOrThrow()
519519 );
520520 
521 // Append Claude's entire turn to the running conversation, then the tool result.
521 // Append Claude's turn, then the tool result, to the running conversation.
522522 // Rebuilding only the tool_use block would drop any other content blocks Claude
523 // returned (e.g. leading text when the tool call is not forced) — append the
524 // full turn, as the other language tabs do.
523 // returned, for example leading text when the tool call is not forced.
525524 messages.add(response.toParam());
526525 messages.add(MessageParam.ofUserOfContentBlockParams(List.of(
527526 ContentBlockParam.ofToolResult(
from line 554
555554 .text("To configure the product, navigate to Settings > Configuration. The default timeout is 30 seconds, but can be adjusted between 10-120 seconds based on your needs.")
556555 .build()
557556 ))
558 .citations(CitationsConfigParam.builder().enabled(true).build())
557 .citations(CitationsConfigParam.builder()
558 .enabled(true)
559 .build())
559560 .build()
560561 ),
561562 ToolResultBlockParam.Content.Block.ofSearchResult(
from line 568
567568 .text("If you encounter timeout errors, first check the configuration settings. Common causes include network latency and incorrect timeout values.")
568569 .build()
569570 ))
570 .citations(CitationsConfigParam.builder().enabled(true).build())
571 .citations(CitationsConfigParam.builder()
572 .enabled(true)
573 .build())
571574 .build()
572575 )
573576 );
from line 595
592595 ]
593596 ];
594597 
595 function searchKnowledgeBase($query) {
598 function searchKnowledgeBase($query)
599 {
596600 return [
597601 [
598602 'type' => 'search_result',
from line 1050
10461050 .text("All API requests must include an API key in the Authorization header. Keys can be generated from the dashboard. Rate limits: 1000 requests per hour for standard tier, 10000 for premium.")
10471051 .build()
10481052 ))
1049 .citations(CitationsConfigParam.builder().enabled(true).build())
1053 .citations(CitationsConfigParam.builder()
1054 .enabled(true)
1055 .build())
10501056 .build()
10511057 ),
10521058 ContentBlockParam.ofSearchResult(
from line 1064
10581064 .text("To get started: 1) Sign up for an account, 2) Generate an API key from the dashboard, 3) Install our SDK using pip install company-sdk, 4) Initialize the client with your API key.")
10591065 .build()
10601066 ))
1061 .citations(CitationsConfigParam.builder().enabled(true).build())
1067 .citations(CitationsConfigParam.builder()
1068 .enabled(true)
1069 .build())
10621070 .build()
10631071 ),
10641072 ContentBlockParam.ofText(
from line 1122
11141122 ]
11151123 ]
11161124 ],
1117 model: 'claude-opus-5-5',
1125 model: Model::CLAUDE_OPUS_5_5,
11181126 );
11191127 
11201128 echo json_encode($message, JSON_PRETTY_PRINT);
from line 1451
14431451 }
14441452 
14451453 # Replay a conversation that provides search results both ways: the first
1446 # user message carries a pre-fetched result, the tool result returns another
1454 # user message carries a pre-fetched result, and the tool result returns another
14471455 response = client.messages.create(
14481456 model="claude-opus-5-5",
14491457 max_tokens=1024,
from line 1537
15291537 };
15301538 
15311539 // Replay a conversation that provides search results both ways: the first
1532 // user message carries a pre-fetched result, the tool result returns another
1540 // user message carries a pre-fetched result, and the tool result returns another
15331541 const response = await client.messages.create({
15341542 model: "claude-opus-5-5",
15351543 max_tokens: 1024,
from line 1609
16011609 AnthropicClient client = new();
16021610 
16031611 // Replay a conversation that provides search results both ways: the first
1604 // user message carries a pre-fetched result, the tool result returns another
1612 // user message carries a pre-fetched result, and the tool result returns another
16051613 var response = await client.Messages.Create(new()
16061614 {
16071615 Model = Model.ClaudeOpus5_5,
from line 1705
16971705 }
16981706 
16991707 // Replay a conversation that provides search results both ways: the first
1700 // user message carries a pre-fetched result, the tool result returns another
1708 // user message carries a pre-fetched result, and the tool result returns another
17011709 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
17021710 Model: anthropic.ModelClaudeOpus5_5,
17031711 MaxTokens: 1024,
from line 1780
17721780 .build();
17731781 
17741782 // Replay a conversation that provides search results both ways: the first
1775 // user message carries a pre-fetched result, the tool result returns another
1783 // user message carries a pre-fetched result, and the tool result returns another
17761784 MessageCreateParams params = MessageCreateParams.builder()
17771785 .model(Model.CLAUDE_OPUS_5_5)
17781786 .maxTokens(1024L)
from line 1792
17841792 .content(List.of(TextBlockParam.builder()
17851793 .text("Acme Dashboard is a monitoring tool for distributed systems. It supports real-time alerting and custom metric dashboards.")
17861794 .build()))
1787 .citations(CitationsConfigParam.builder().enabled(true).build())
1795 .citations(CitationsConfigParam.builder()
1796 .enabled(true)
1797 .build())
17881798 .build()),
17891799 ContentBlockParam.ofText(TextBlockParam.builder()
17901800 .text("What does Acme Dashboard do, and what plans is it available on?")
from line 1820
18101820 .content(List.of(TextBlockParam.builder()
18111821 .text("Acme Dashboard is available on the Starter plan at $10 per user per month and the Enterprise plan with custom pricing.")
18121822 .build()))
1813 .citations(CitationsConfigParam.builder().enabled(true).build())
1823 .citations(CitationsConfigParam.builder()
1824 .enabled(true)
1825 .build())
18141826 .build())
18151827 ))
18161828 .build())
from line 1850
18381850 ];
18391851 
18401852 // Replay a conversation that provides search results both ways: the first
1841 // user message carries a pre-fetched result, the tool result returns another
1853 // user message carries a pre-fetched result, and the tool result returns another
18421854 $response = $client->messages->create(
18431855 maxTokens: 1024,
18441856 tools: [$knowledgeBaseTool],
from line 1912
19001912 ]
19011913 ]
19021914 ],
1903 model: 'claude-opus-5-5',
1915 model: Model::CLAUDE_OPUS_5_5,
19041916 );
19051917 
19061918 echo json_encode($response, JSON_PRETTY_PRINT);
from line 1934
19221934 }
19231935 
19241936 # Replay a conversation that provides search results both ways: the first
1925 # user message carries a pre-fetched result, the tool result returns another
1937 # user message carries a pre-fetched result, and the tool result returns another
19261938 response = client.messages.create(
19271939 model: Anthropic::Model::CLAUDE_OPUS_5_5,
19281940 max_tokens: 1024,
from line 2128
21162128 
21172129## Limitations
21182130 
2119* Search result content blocks are available on Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed).
2131* Search result content blocks are available on the Claude API, Amazon Bedrock, and Claude Models on Google Cloud (Google managed).
21202132* Only text content is supported within search results (no images or other media).
21212133* `search_result` blocks can only appear in user messages (including inside tool results). Assistant messages with search results are rejected.
21222134* When the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) is enabled in the same request, citations must be enabled on all `search_result` blocks.
Feedback