define-tools changedagents-and-tools/tool-use/define-tools
Nearest release: v2.1.301, published 5 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+54added
Lines−58removed
From line
146
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits18to this page, all time
The whole hunk
from line 146, old and new numbered
/
from line 146
146146 -H "content-type: application/json" \
147147 -H "x-api-key: $ANTHROPIC_API_KEY" \
148148 -H "anthropic-version: 2023-06-01" \
149 -d @- <<'EOF'
150 {
151 "model": "claude-opus-5-5",
152 "max_tokens": 1024,
153 "tools": [
154 {
155 "name": "get_weather",
156 "description": "Get the current weather in a given location",
157 "input_schema": {
158 "type": "object",
159 "properties": {
160 "location": {
161 "type": "string",
162 "description": "The city and state, e.g. San Francisco, CA"
149 -d '{
150 "model": "claude-opus-5-5",
151 "max_tokens": 1024,
152 "tools": [
153 {
154 "name": "get_weather",
155 "description": "Get the current weather in a given location",
156 "input_schema": {
157 "type": "object",
158 "properties": {
159 "location": {
160 "type": "string",
161 "description": "The city and state, e.g. San Francisco, CA"
162 },
163 "unit": {
164 "type": "string",
165 "enum": ["celsius", "fahrenheit"],
166 "description": "The unit of temperature"
167 }
163168 },
164 "unit": {
165 "type": "string",
166 "enum": ["celsius", "fahrenheit"],
167 "description": "The unit of temperature"
168 }
169 "required": ["location"]
169170 },
170 "required": ["location"]
171 },
172 "input_examples": [
173 {"location": "San Francisco, CA", "unit": "fahrenheit"},
174 {"location": "Tokyo, Japan", "unit": "celsius"},
175 {"location": "New York, NY"}
176 ]
177 }
178 ],
179 "messages": [
180 {"role": "user", "content": "What's the weather like in San Francisco?"}
181 ]
182 }
183 EOF
171 "input_examples": [
172 {"location": "San Francisco, CA", "unit": "fahrenheit"},
173 {"location": "Tokyo, Japan", "unit": "celsius"},
174 {"location": "New York, NY"}
175 ]
176 }
177 ],
178 "messages": [
179 {"role": "user", "content": "What is the weather like in San Francisco?"}
180 ]
181 }'
184182 ```
185183
186184 ```bash CLI
from line 569
571569 -H "content-type: application/json" \
572570 -H "x-api-key: $ANTHROPIC_API_KEY" \
573571 -H "anthropic-version: 2023-06-01" \
574 -d @- <<'EOF'
575 {
576 "model": "claude-opus-5",
577 "max_tokens": 1024,
578 "tools": [
579 {
580 "name": "get_weather",
581 "description": "Get the current weather in a given location",
582 "input_schema": {
583 "type": "object",
584 "properties": {
585 "location": {
586 "type": "string",
587 "description": "The city and state, e.g. San Francisco, CA"
588 }
589 },
590 "required": ["location"]
572 -d '{
573 "model": "claude-opus-5",
574 "max_tokens": 1024,
575 "tools": [
576 {
577 "name": "get_weather",
578 "description": "Get the current weather in a given location",
579 "input_schema": {
580 "type": "object",
581 "properties": {
582 "location": {
583 "type": "string",
584 "description": "The city and state, e.g. San Francisco, CA"
585 }
586 },
587 "required": ["location"]
588 }
591589 }
592 }
593 ],
594 "tool_choice": {"type": "tool", "name": "get_weather"},
595 "messages": [
596 {"role": "user", "content": "What's the weather like in San Francisco?"}
597 ]
598 }
599 EOF
590 ],
591 "tool_choice": {"type": "tool", "name": "get_weather"},
592 "messages": [
593 {"role": "user", "content": "What is the weather like in San Francisco?"}
594 ]
595 }'
600596 ```
601597
602598 ```bash CLI
No line in this hunk matches that.