Tool use lets a model-generated request reach application logic that supplies otherwise unavailable data or performs an action, such as invoking an API or updating data. Spring AI provides a consistent way to expose tools across supported model providers. section 6.1
A tool-driven interaction proceeds as a multipart conversation:
- The application sends the user request together with a tool definition, including its name, description, and input schema. section 6.1
- The model returns a tool call rather than a final answer, selecting the tool and providing arguments such as a time zone. section 6.1.2
- Spring AI invokes the tool, adds the result to the conversation with a tool role, and sends the expanded request back to the model. section 6.1.2
- The model uses the returned data to produce the final response, changing the completion reason from tool_calls to stop. section 6.1.2
Current time in Jal, New Mexico
For a question about Jal, New Mexico, the model identifies the America/Denver time zone and requests getCurrentTime with that argument. After the application returns the timestamp, the model answers with the local date and time. section 6.1.2












