A2A Tool Events for Slack
Audience: A2A agent developers who want Mentionable Slack Connector to show tool execution as structured Slack UI.
Status: implementation guide. This is not an A2A core standard. The
normative Mentionable extension contract is
docs/spec/a2a-tool-events-v0.1.md.
Mentionable Slack Connector renders tool calls only when the A2A response
carries structured tool events. Plain text like calling search(...) remains
plain text.
For REST transport agents, use rest-tool-events-slack-guide instead. REST
uses normalized tool_call parts directly; A2A uses DataPart plus the
Mentionable A2A tool-events extension.
What Is Standard
A2A core standardizes the carrier:
Message.partsandTask.status.message.parts- structured JSON
DataPart - streaming task status updates
- Agent Card extension declarations
A2A core does not standardize an internal tool-call event schema. The payload
fields below are Mentionable’s https://mentionable.dev/ns/a2a-tool-events/v0.1
extension shape, carried inside an A2A DataPart.
Required Contract
Emit tool events as A2A data parts:
{
"kind": "data",
"data": {
"type": "tool-call",
"toolCallId": "call_1",
"toolName": "execute_graphql",
"input": {
"query": "{ posts { title } }"
}
}
}
For a successful result, emit tool-result with the same toolCallId:
{
"kind": "data",
"data": {
"type": "tool-result",
"toolCallId": "call_1",
"toolName": "execute_graphql",
"input": {
"query": "{ posts { title } }"
},
"output": {
"posts": [{ "title": "Hello" }]
}
}
}
For a failure, emit tool-error:
{
"kind": "data",
"data": {
"type": "tool-error",
"toolCallId": "call_1",
"toolName": "execute_graphql",
"input": {
"query": "{ posts { title } }"
},
"error": {
"message": "database timeout"
}
}
}
Use a stable toolCallId for the same execution. If the call event and result
event use different ids, Slack treats them as different tool calls.
Place the parts in one of the normal A2A response locations:
Message.partsTask.status.message.parts- for streaming,
status-update.status.message.parts
For streaming status messages, message.role must be agent.
Recommended
Declare the extension in the Agent Card so clients can discover support. This is not a hard requirement for Slack rendering, but it is the right discovery and compatibility signal.
{
"capabilities": {
"streaming": true,
"extensions": [
{
"uri": "https://mentionable.dev/ns/a2a-tool-events/v0.1",
"description": "Visible tool execution events carried as A2A DataParts."
}
]
}
}
If your server emits tool events only when the client opts in, mark the extension as required:
{
"uri": "https://mentionable.dev/ns/a2a-tool-events/v0.1",
"required": true
}
Mentionable Slack Connector forwards required extension URIs in
a2a-extensions and x-a2a-extensions request headers.
For streaming, emit tool-call first and then update the same id with
tool-result or tool-error. Slack shows an in-flight tool message and then
updates it to success or failure.
For single-shot final responses, prefer emitting only the final tool-result
or tool-error for each tool. Emitting both tool-call and tool-result in
the same final response can render as two separate tool entries.
Include durationMs and startedAt when available:
{
"kind": "data",
"data": {
"type": "tool-result",
"toolCallId": "call_1",
"toolName": "execute_graphql",
"input": { "query": "{ posts { title } }" },
"output": { "posts": [{ "title": "Hello" }] },
"durationMs": 412,
"startedAt": "2026-05-05T00:00:00.000Z"
}
}
Keep input and output human-inspectable. Slack detail buttons have payload
limits, so very large arguments or results may be truncated in the UI.
Avoid
- Rendering tool calls only as natural-language text.
- Sending new tool events through
TextPart.metadata. - Inventing a different
DataPartpayload such as{ "tool": ... }. - Depending on raw provider stream records such as
9:{...}ora:{...}. - Reusing one
toolCallIdfor multiple tool executions.
Mentionable accepts a few legacy and provider-specific shapes for migration,
but new A2A agents should emit the DataPart extension shape above.
AI SDK raw stream lines such as 0:, 9:, and a: are accepted by the Slack
Connector as a compatibility fallback, but they are not the Mentionable wire
contract. New agents should emit the transport-native A2A shape documented
here.
The Slack Connector also best-effort decodes the A2A samples Traceability
Extension as an extension-rendering input. When an agent advertises that
extension in its Agent Card, the connector can activate it with
X-A2A-Extensions. Traceability is treated as an observability trace fallback,
not as a replacement for this visible tool-event contract.
Native Tool Permission Approval
Approving a native tool permission is not a tool event, and it does not
produce a new conversational turn. vicoop-bridge’s optional
tool-approval v1
extension keeps the Claude/Codex execution waiting and moves the task to the
standard A2A auth-required state. The status message
carries the request under the extension URI key. After the runtime consumes
a decision, the task returns to working on the same stream, and that
status message carries a decision notice (requestId, decision,
decidedBy).
@mentionable/connector-kit parses both into a typed toolApproval state
on stream frames, callA2A results and Task snapshots (issue #641). It
never renders approval traffic as text or tool_call parts, including
malformed variants. The native input is sensitive. Show it only to a user
the bridge has verified as an approver; A2A call authority alone never
confers that permission. Connectors acting for the original requester use
only requesterApprovalUrl. The decision carried in the notice is advisory:
fetch the requester endpoint for the authoritative state.
The bridge marks this pause final: false, but its A2A SDK re-marks it
final: true while the stream keeps flowing. For this optional extension’s
approval pause only, connector-kit treats final as a pause, not as
completion, and keeps reading. Ordinary final events are unaffected.
A dropped stream does not end a pending request. Keep reconciling through
the task instead of reporting the approval as failed. The AskUserQuestion
input-required flow is separate and unchanged.
The Slack Connector’s requester review card, modal, durable binding and reconciler are described in slack-tool-approvals.