ToolCallContext
The tool call an AgentTool.execute is running for. Agent loops install it in the coroutine context, so a tool reaches it with current without the AgentTool interface growing parameters:
override suspend fun execute(arguments: JsonObject): String {
ToolCallContext.current()?.progress("Downloading…")
…
}Content copied to clipboard
Properties
Functions
Link copied to clipboard
Return url to the model as well, as Pydantic AI's ToolReturn.content: on-device model loops send it in a user message right after the tool results, so a vision model sees it (e.g. a browser screenshot); the chat shows it with the call, like file. Servers' protocols carry tool results as text, so it reaches only models the device calls.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard