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

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

Nearest release: v2.1.307, published 6 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+24added
Lines−25removed
From line 137 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits11to this page, all time

The whole hunk

from line 137, old and new numbered
/
lines
from line 137
137137 
138138 
139139 # Build up the conversation in a list, starting with the user's question
140 messages = [
141 MessageParam(role="user", content="How do I configure the timeout settings?")
140 messages: list[MessageParam] = [
141 {"role": "user", "content": "How do I configure the timeout settings?"}
142142 ]
143143 
144144 # Create a message with the tool
from line 157
157157 tool_result = search_knowledge_base(tool_use.input["query"])
158158 
159159 # Append Claude's turn, then the tool result, to the running conversation
160 messages.append(MessageParam(role="assistant", content=response.content))
160 messages.append({"role": "assistant", "content": response.content})
161161 messages.append(
162 MessageParam(
163 role="user",
164 content=[
162 {
163 "role": "user",
164 "content": [
165165 ToolResultBlockParam(
166166 type="tool_result",
167167 tool_use_id=tool_use.id,
from line 168
168168 content=tool_result, # Search results go here
169169 )
170170 ],
171 )
171 }
172172 )
173173 
174174 # Send the tool result back
from line 870
870870 ```
871871 
872872 ```python Python
873 from anthropic.types import MessageParam, TextBlockParam, SearchResultBlockParam
873 from anthropic.types import TextBlockParam, SearchResultBlockParam
874874 
875875 client = Anthropic()
876876 
from line 879
879879 model="claude-opus-5-5",
880880 max_tokens=1024,
881881 messages=[
882 MessageParam(
883 role="user",
884 content=[
882 {
883 "role": "user",
884 "content": [
885885 SearchResultBlockParam(
886886 type="search_result",
887887 source="https://docs.company.com/api-reference",
from line 911
911911 text="Based on these search results, how do I authenticate API requests and what are the rate limits?",
912912 ),
913913 ],
914 )
914 }
915915 ],
916916 )
917917 
from line 1439
14391439 
14401440 ```python Python
14411441 from anthropic.types import (
1442 MessageParam,
14431442 SearchResultBlockParam,
14441443 TextBlockParam,
14451444 ToolResultBlockParam,
from line 1464
14651464 max_tokens=1024,
14661465 tools=[knowledge_base_tool],
14671466 messages=[
1468 MessageParam(
1469 role="user",
1470 content=[
1467 {
1468 "role": "user",
1469 "content": [
14711470 SearchResultBlockParam(
14721471 type="search_result",
14731472 source="https://docs.company.com/overview",
from line 1484
14851484 text="What does Acme Dashboard do, and what plans is it available on?",
14861485 ),
14871486 ],
1488 ),
1489 MessageParam(
1490 role="assistant",
1491 content=[
1487 },
1488 {
1489 "role": "assistant",
1490 "content": [
14921491 TextBlockParam(
14931492 type="text", text="Let me check the pricing information."
14941493 ),
from line 1498
14991498 input={"query": "Acme Dashboard pricing plans"},
15001499 ),
15011500 ],
1502 ),
1503 MessageParam(
1504 role="user",
1505 content=[
1501 },
1502 {
1503 "role": "user",
1504 "content": [
15061505 ToolResultBlockParam(
15071506 type="tool_result",
15081507 tool_use_id="toolu_01A09q90qw90lq917835lq9",
from line 1521
15221521 ],
15231522 )
15241523 ],
1525 ),
1524 },
15261525 ],
15271526 )
15281527 
Feedback