#111049Provide internal AI tool provider based on Action API
Description
Actions of the Action API (#111046) carry all information AI models need for tool calling: name, description, input and output JSON Schema and whether they are read-only, destructive or idempotent.
Both an MCP server (tools/list, tools/call) and outgoing requests to AI APIs (OpenAI-style tools / function calling) need these tools in the same shape. To avoid each of them building on the action registry separately, add an internal ToolProvider that maps every action to a protocol-independent Tool:
- a tool name that is valid for AI APIs, derived from type and name of the action
- summary, description, input and output JSON Schema
- hints for read-only, destructive and idempotent tools
- the required scopes, to filter tools by the scopes granted to the caller
- a handler that invokes the action with validation in the context of the calling user (
ToolContext)
The classes are marked internal and serve as a shared base for the MCP server and AI API integrations
Reviews 1
History 27
-
Georg Ringer changed status
NewAccepted <span data-processor="relativetime" data-value="2026-10-14T11:47:34+00:00" > 10/14/26, 11:47 </span> -
Gerrit Code Review pushed patch set 27 for main to change 92223 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2026-10-14T12:54:03+00:00" > 10/14/26, 12:54 </span> -
Benjamin Franzke changed parent task #111053 <span data-processor="relativetime" data-value="2026-10-14T12:58:30+00:00" > 10/14/26, 12:58 </span>
-
Gerrit Code Review pushed patch set 28 for main to change 92223 <span data-processor="relativetime" data-value="2026-10-14T13:17:26+00:00" > 10/14/26, 13:17 </span>
-
Gerrit Code Review pushed patch set 29 for main to change 92223 <span data-processor="relativetime" data-value="2026-10-28T21:05:15+00:00" > 10/28/26, 21:05 </span>
-
Gerrit Code Review pushed patch set 30 for main to change 92223 <span data-processor="relativetime" data-value="2026-11-03T17:37:05+00:00" > 11/03/26, 17:37 </span>
-
Gerrit Code Review pushed patch set 31 for main to change 92223 <span data-processor="relativetime" data-value="2026-11-06T10:37:39+00:00" > 11/06/26, 10:37 </span>