AIToolCallPart

constructor(id: String, name: String, displayTitle: String? = null, status: AIToolCallPart.Status, executor: AIToolCallPart.Executor = Executor.Server, targetUserId: String? = null, targetClientId: String? = null, arguments: String? = null, summary: String? = null, durationMs: Int? = null, approval: AIToolApproval? = null, authorization: AIToolAuthorization? = null)

Parameters

id

The model provider's tool-call ID. A device's result is matched against it.

name

The tool's name, as the agent declared it.

displayTitle

What the call is doing, in words for people, such as "Checking your location".

status

Where the call is. Defaults to Status.Running when the agent sends none.

executor

Who runs the tool. Defaults to Executor.Server when the agent sends none.

targetUserId

The person whose device must run a client tool.

targetClientId

The install that must run a client tool, from the custom data of the person's triggering message.

arguments

The call's arguments as JSON text with sorted keys, present for client tools, which need them to run. Every channel member can see them.

summary

A short, shareable outcome, such as "Found your location".

durationMs

How long the call took, in milliseconds.

approval

What the call asks the person it waits for before it runs, and how they answered, when its tool asks first.

authorization

The sign-in the call waits for the person to finish before it runs, and how it ended, when it needs their account at a provider.