Or:
{
"system": "You know information only about Boston. Deny information for other places.",
"messages": [
{
"role": "user",
"content": [{"type": "text", "text": "What is the zipcode of New York?"}]
}
]
}
You can call tools and functions. Run
the integration with the
tools
parameter that includes related information about
the functions. For
example:
{
"model": "claude-opus-4-20250514",
"max_tokens": 1024,
"tools": "[\n {\n \"name\": \"get_weather\",\n
\"description\": \"Get the current weather in a given location\",\n
\"input_schema\": {\n \"type\": \"object\",\n
\"properties\": {\n \"location\": {\n
\"type\": \"string\",\n
\"description\": \"The city and state, e.g. San Francisco, CA\"\n },
\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\n \"celsius\",\n \"fahrenheit\"\n ],\n \"description\": \"The unit of temperature, either 'celsius' or 'fahrenheit'\"\n }\n },\n \"required\": [\n \"location\"\n ]\n }\n },\n {\n \"name\": \"get_time\",\n \"description\": \"Get the current time in a given time zone\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"timezone\": {\n \"type\": \"string\",\n \"description\": \"The IANA time zone name, e.g. America/Los_Angeles\"\n }\n },\n \"required\": [\n \"timezone\"\n ]\n }\n }\n ]",
"messages": [{
"role": "user",
"content": [
{
"type": "text","text": "What is the weather like right now in New York? Also what
time is it there?"
}]
}]
}
This framework allows the model to
interact with services and perform actions based on
your prompt.