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.