Publish and enable
An operator with access to the agent can publish a version 1 manifest usingPUT /api/agents/{slug}/connectors/{connectorID}/client-tools. The connector
must belong to that agent and use the generic application transport. The request
contains version and tools, and the response reports the content revision.
Each tool declares these fields.
Publication replaces the catalog atomically. New versions start disabled, and
republishing identical definitions retains existing grants. Published versions
are immutable. Publish both versions while old clients still need support.
When a tool leaves the catalog it becomes unavailable immediately. The agent’s
Client tools section lists the current catalog and controls enablement and
confirmation. The product’s required confirmation is a floor.
Send and handle a call
On a new direct message, the application can includeclient_tool_session
in the signed command bytes. It contains the mounted session’s UUID
sessionId, a target with scopeId, surfaceId and revision, and
tools as a list of supported {id, version} pairs. These are capabilities
for that turn. They never grant new permissions. Use a different unpredictable
session ID for each mount. Keep that ID stable during retries of the same
command. Keep client tool activations out of background, group, and steering
commands.
The trusted application backend exchanges a signed
create_client_tool_session operation for a short-lived bearer. The exchange
identifies the actor, conversation, and client_tool_session_id. The client
uses the bearer with the following endpoints.
POST /generic/client-sessions/tool-calls/pollreturns the current invocation or null after a short wait. Poll only while an interactive turn can reach the mounted surface.POST /generic/client-sessions/tool-calls/approvalrecords the actor’s affirmative interaction for the exactidwhen confirmation is required. Only execute after this endpoint acknowledges the decision.POST /generic/client-sessions/tool-calls/receiptsettles that call.succeededincludesresult.dataand may include the resultingnextTargetfor a subsequent call.rejectedmeans the handler did not enter.unknownmeans the client could not confirm the outcome.
App context and navigation
When the conversation snapshot advertisescapabilities.applicationToolContext,
an interactive client may attach context to its activation. Version 1
includes the focused screen ID, observation revision, a compact list of
client-resolvable destinations, and optional visible state. The encoded
context is limited to 8 KiB. Keep it detached from the app store and include
only explicitly selected, already-readable observations. Formation sends it
as untrusted input rather than system instructions. The tool definitions
actually sent to the model are recorded on the model call alongside the
client advertisement. When runtime traces are enabled, the
application_tool_offer span event reports each advertised version as
offered, unpublished, or missing a grant.
For a navigation tool published with surfaceTransition: true, a successful
receipt can return result.nextSession in place of result.nextTarget.
The client returns it after the destination is ready. It contains the same
session ID and scope, a new target, current supported tool versions, and
app context. Formation reconstructs the latest state from durable receipts
after a restart and re-evaluates the offer against active grants. A client
cannot grant a tool by advertising it. A navigation call and another app
action must be issued in separate model rounds. Common application
operations can navigate and update the destination within one typed tool.
The client still rejects calls after an unrelated screen, window, actor, or
workspace change. Background turns have no live application target.