Tool responses
Built-in tools (weather, search, documents and so on) are enabled on the assistant in Aist Backend, not through the Agent API. This page shows what their responses look like in output.
output[].tool_call.output.
Tools that the client controls are client tools.
A successful result of any tool has the shape
{ "type": "content", "content": [{ "type": "text", "text": "…" }] }. The
text usually holds a JSON string or plain text. Below is what each tool returns.
Data and utilities
| Tool | text in the response |
|---|---|
get_time | One line per time zone: Moscow and UTC, preceded by the user’s local time (when their time zone is known) and the zone the model asked about. The weekday is in Russian: "Moscow (UTC+3): 2026-04-23 14:32:05, четверг (GMT+03:00)\nUTC: 2026-04-23T11:32:05Z" |
get_current_weather | OpenWeatherMap JSON: {"weather":[…],"main":{"temp":12.3,…},"wind":{…}} |
get_currency_info | {"base":"USD","target":"RUB","rate":92.45} |
web_search | Text with Perplexity search results. |
look_image | A text description of the image (vision model). |
Image generation
generate_image returns a file — both inside tool_call.output and as a separate file item in output[]:
"output": { "type": "content", "content": [{ "type": "file", "file": { "id": "88", "name": "generated_….png", "mime_type": "image/png" } }] }
google/gemini-2.5-flash-image) generate the picture
without a tool_call — straight as a file item in output[]
(a mixed “text + file” reply is possible too).
Documents
| Tool | text in the response |
|---|---|
read_document | {"page":1,"total_pages":12,"elements":[{"type":"heading","text":"…"},…]} |
get_document_content | {"offset":0,"limit":100,"total":247,"has_more":true,"elements":[…]} |
read_table | CSV: date,name,amount\n2026-04-01,Smith,1500\n… |
search_document_vector | {"results":[{"score":0.94,"page":8,"text":"…"},…]} |
search_document_fulltext | {"results":[{"page":3,"element_type":"paragraph","text":"…"},…]} (up to 10) |
Collections (knowledge bases)
| Tool | text in the response |
|---|---|
search_collection_vector | {"results":[{"score":0.97,"document":"refund-policy.pdf","page":1,"text":"…"},…]} |
search_collection_fulltext | {"results":[{"document":"…","page":2,"type":"paragraph","text":"…"},…]} (up to 10) |
External tools (external_tools)
An assistant can call tools with their own callback URL (configured in Aist Backend). The model sees them
under a name prefixed with ext_. In output they look like a regular
tool_call — with whatever the external service returned:
{
"type": "tool_call",
"tool_call": {
"name": "ext_book_room",
"input": { "room": "#3", "time": "15:00" },
"output": { "type": "content", "content": [{ "type": "text", "text": "Booking BK-2091" }] },
"cost": 0
}
}
external_tools are called by the server (at the
configured URL), and the task isn’t interrupted. client_tools interrupt the task and hand
control to you — see Client tools.